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 set -eu
# Retrieve arguments # Retrieve arguments
app=duniter app=$YNH_APP_INSTANCE_NAME
domain=$1 domain=$YNH_APP_ARG_DOMAIN
path=$2 path=$YNH_APP_ARG_PATH
port=$3 port=$YNH_APP_ARG_PORT
sync_node=$4 sync_node=$YNH_APP_ARG_SYNC_NODE
sync_port=$5 sync_port=$YNH_APP_ARG_SYNC_PORT
salt=$6 salt=$YNH_APP_ARG_SALT
password=$7 password=$YNH_APP_ARG_PASSWORD
cpu=`bc -l <<< "scale=2; $8/100"` cpu=`bc -l <<< "scale=2; $YNH_APP_ARG_CPU/100"`
version=$(cat ../conf/upstream_version) version=$(cat ../conf/upstream_version)
# Source app helpers # Source app helpers

View file

@ -3,7 +3,7 @@
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
app=duniter app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain) domain=$(ynh_app_setting_get $app domain)
port=$(ynh_app_setting_get $app port) port=$(ynh_app_setting_get $app port)

View file

@ -6,8 +6,8 @@ set -eu
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
# Retrive CPU architecure # Retrive arguments
app=duniter app=$YNH_APP_INSTANCE_NAME
arch=$(ynh_app_setting_get "$app" arch) arch=$(ynh_app_setting_get "$app" arch)
version=$(cat ../conf/upstream_version) version=$(cat ../conf/upstream_version)