Changes

From Amahi Wiki
Jump to: navigation, search
928 bytes added ,  04:00, 20 July 2014
Things needed Here are some environment variables that are available to be used in app install scripts:
* AMAHI_HDA_IPHDA_APP_DIR: HDA IPDirectory of the webapp* AMAHI_APP_DIRHDA_IP: Directory the internal IP of the webapp (basically, PWD)HDA* AMAHI_APP_NAMEHDA_APP_NAME: App name* AMAHI_GW_IPHDA_DOMAIN: IP internal domain of the router?this HDA* HDA_APP_USERNAME: admin username (if available, otherwise undefined)* AMAHI_NETMASKHDA_APP_PASSWORD: Netmask?admin password (if available, otherwise undefined)* AMAHI_ADMIN_USERNAMEHDA_1ST_ADMIN: username of the 1st admin user  Available in Amahi 7.2 and later: These are only defined if the app has a database:* HDA_DB_DBNAME name of the database for the app* HDA_DB_USERNAME usernameof the database for the app* HDA_DB_PASSWORD password of the database for the app* HDA_DB_HOSTNAME hostname of the machine where the database is hosted (typically localhost, but please use this variable anyway) == Examples == * AMAHI_ADMIN_PASSWORD: Suppose the app needs to initialize the DB for an app with an initial admin user and password. The script could use <code>echo "insert .... '$HDA_APP_USERNAME' ..." </code>* Same thing with the domain name for this HDA.* Suppose there is a need to create a directory for storing some file with a user name. The app install script could do <code>mkdir -p $HDA_1ST_ADMIN" </code>
12,424

edits