diff --git a/scripts/install b/scripts/install index eea6b2f..9d31c80 100755 --- a/scripts/install +++ b/scripts/install @@ -4,15 +4,15 @@ set -eu # Retrieve arguments -app=duniter -domain=$1 -path=$2 -port=$3 -sync_node=$4 -sync_port=$5 -salt=$6 -password=$7 -cpu=`bc -l <<< "scale=2; $8/100"` +app=$YNH_APP_INSTANCE_NAME +domain=$YNH_APP_ARG_DOMAIN +path=$YNH_APP_ARG_PATH +port=$YNH_APP_ARG_PORT +sync_node=$YNH_APP_ARG_SYNC_NODE +sync_port=$YNH_APP_ARG_SYNC_PORT +salt=$YNH_APP_ARG_SALT +password=$YNH_APP_ARG_PASSWORD +cpu=`bc -l <<< "scale=2; $YNH_APP_ARG_CPU/100"` version=$(cat ../conf/upstream_version) # Source app helpers diff --git a/scripts/remove b/scripts/remove index a8fabfb..cab866c 100755 --- a/scripts/remove +++ b/scripts/remove @@ -3,7 +3,7 @@ # Source app helpers source /usr/share/yunohost/helpers -app=duniter +app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) port=$(ynh_app_setting_get $app port) diff --git a/scripts/upgrade b/scripts/upgrade index 4115370..a721efc 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -6,8 +6,8 @@ set -eu # Source app helpers source /usr/share/yunohost/helpers -# Retrive CPU architecure -app=duniter +# Retrive arguments +app=$YNH_APP_INSTANCE_NAME arch=$(ynh_app_setting_get "$app" arch) version=$(cat ../conf/upstream_version)