From 3ecb69de8f431383a7e87a1deb30fcc30cf918ad Mon Sep 17 00:00:00 2001 From: Moul Date: Tue, 14 Mar 2017 09:07:17 +0100 Subject: [PATCH] [mod] scripts: use 'duniter' command as '' var won't works on multi-instances. --- scripts/install | 8 ++++---- scripts/remove | 4 ++-- scripts/upgrade | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index e7d0c52..47d8f26 100755 --- a/scripts/install +++ b/scripts/install @@ -58,18 +58,18 @@ sudo yunohost firewall allow TCP $port > /dev/null 2>&1 INSTALL_DUNITER_DEBIAN_PACKAGE # Configure Duniter node -sudo $app config --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 80 --noupnp +sudo duniter config --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 80 --noupnp sudo duniter config --addep "BMAS $domain 443" # Reset Duniter node's existing data (blockchain, not conf) -sudo $app reset data > /dev/null +sudo duniter reset data > /dev/null # Synchronize Duniter node echo "Synchronizing with $sync_node:$sync_port. It may take a while." -sudo $app sync $sync_node $sync_port --nointeractive > /dev/null +sudo duniter sync $sync_node $sync_port --nointeractive > /dev/null # Launch Duniter node -sudo $app webstart +sudo duniter webstart # Add Duniter service to the YunoHost monitoring sudo yunohost service add $app --log /home/admin/.config/$app/"$app"_default/"$app".log diff --git a/scripts/remove b/scripts/remove index 22e4fff..40b1e7a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -11,8 +11,8 @@ domain=$(ynh_app_setting_get $app domain) port=$(ynh_app_setting_get $app port) # Remove Duniter -sudo $app stop -sudo dpkg -r $app +sudo duniter stop +sudo dpkg -r duniter # Remove data and conf sudo rm -rf /root/.conf/duniter diff --git a/scripts/upgrade b/scripts/upgrade index cb64b2c..8647560 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,7 +16,7 @@ admin=$(ynh_app_setting_get "$app" admin) is_cesium_public=$(ynh_app_setting_get "$app" is_cesium_public) # Stop duniter daemon -sudo $app stop +sudo duniter stop # Remove Duniter package sudo dpkg -r duniter @@ -24,7 +24,7 @@ sudo dpkg -r duniter INSTALL_DUNITER_DEBIAN_PACKAGE # Start duniter daemon -sudo $app webstart +sudo duniter webstart CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS CONFIG_NGINX_FOR_WEB_ADMIN