1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pluxml_ynh.git synced 2024-09-03 20:16:02 +02:00

[enh] retrieve arguments from env variables.

- install: do not works for is_public and default_lang:
 - Warning: ./install: line 15: YNH_APP_ARG_IS_PUBLIC: unbound variable
This commit is contained in:
Moul 2016-06-18 08:25:09 +00:00
parent 42d33ffc60
commit 7a1c7e1688
5 changed files with 11 additions and 13 deletions

View file

@ -3,7 +3,7 @@
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -eu set -eu
app=pluxml app=$YNH_APP_INSTANCE_NAME
app_path=/var/www/$app app_path=/var/www/$app
save_path=$1 save_path=$1

View file

@ -3,13 +3,12 @@
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -eu set -eu
app=pluxml # Retrieve arguments
app=$YNH_APP_INSTANCE_NAME
#retrieve arguments domain=$YNH_APP_ARG_DOMAIN
domain=$1 path=$YNH_APP_ARG_PATH
path=$2 admin=$YNH_APP_ARG_ADMIN
admin=$3 password=$YNH_APP_ARG_PASSWORD
password=$4
is_public=$5 is_public=$5
default_lang=$6 default_lang=$6

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
app=pluxml app=$YNH_APP_INSTANCE_NAME
domain=$(sudo yunohost app setting $app domain) domain=$(sudo yunohost app setting $app domain)
# Source YunoHost helpers # Source YunoHost helpers

View file

@ -3,7 +3,7 @@
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -eu set -eu
app=pluxml app=$YNH_APP_INSTANCE_NAME
app_path=/var/www/$app app_path=/var/www/$app
save_path=$1 save_path=$1

View file

@ -3,9 +3,8 @@
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -eu set -eu
app=pluxml # Retrieve arguments
app=$YNH_APP_INSTANCE_NAME
#retrieve arguments
domain=$(sudo yunohost app setting $app domain) domain=$(sudo yunohost app setting $app domain)
path=$(sudo yunohost app setting $app path) path=$(sudo yunohost app setting $app path)
admin=$(sudo yunohost app setting $app admin) admin=$(sudo yunohost app setting $app admin)