1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/duniter_ynh.git synced 2024-09-03 18:26:35 +02:00

[enh] Retrieve arguments via environment variables.

This commit is contained in:
Moul 2016-06-23 11:27:00 +00:00
parent 6705e38248
commit e6ac3173c8
3 changed files with 12 additions and 12 deletions

View file

@ -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

View file

@ -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)

View file

@ -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)