diff --git a/scripts/functions.sh b/scripts/functions.sh index 0c862d2..eaeda40 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -45,3 +45,12 @@ sudo sed -i "s@YNH_EXAMPLE_DOMAIN@$domain@" $nginx_conf sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf sudo service nginx reload } + + +REMOVE_DUNITER () { +# Stop duniter daemon +sudo duniter stop + +# Remove Duniter package +sudo dpkg -r duniter +} diff --git a/scripts/remove b/scripts/remove index 289040c..69240ce 100755 --- a/scripts/remove +++ b/scripts/remove @@ -10,9 +10,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) port=$(ynh_app_setting_get $app port) -# Remove Duniter -sudo duniter stop -sudo dpkg -r duniter +REMOVE_DUNITER # Remove data and conf sudo rm -rf /root/.conf/duniter diff --git a/scripts/upgrade b/scripts/upgrade index bc542a1..cc74fcc 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,12 +15,7 @@ arch=$(ynh_app_setting_get "$app" arch) admin=$(ynh_app_setting_get "$app" admin) is_cesium_public=$(ynh_app_setting_get "$app" is_cesium_public) -# Stop duniter daemon -sudo duniter stop - -# Remove Duniter package -sudo dpkg -r duniter - +REMOVE_DUNITER INSTALL_DUNITER_DEBIAN_PACKAGE # Start duniter daemon