diff --git a/scripts/functions.sh b/scripts/functions.sh index f9f4950..1817e41 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -16,13 +16,12 @@ sudo sed -i "s@\"host\".*@\"host\": \"$domain\",@" /opt/duniter/sources/node_mod sudo sed -i "s@\"port\".*@\"port\": \"443\"@" /opt/duniter/sources/node_modules/duniter-ui/public/cesium/config.js } -CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS () { +CONFIG_SSOWAT () { # Add admin to the allowed users sudo yunohost app addaccess $app -u $admin # Allow only allowed users to access admin panel -if [ "$is_cesium_public" = "Yes" ]; -then +if [ "$is_cesium_public" = "Yes" ]; then # Cesium is public, do not protect it ynh_app_setting_set "$app" protected_uris "/webui","/webmin" else @@ -37,7 +36,7 @@ ynh_app_setting_set "$app" unprotected_uris "/" ynh_app_setting_set "$app" redirected_urls "{'$domain/':'$domain/webui'}" } -CONFIG_NGINX_FOR_WEB_ADMIN () { +CONFIG_NGINX () { # Configure Nginx nginx_conf="../conf/nginx.conf" sudo sed -i "s@YNH_EXAMPLE_PORT@$port@" $nginx_conf diff --git a/scripts/install b/scripts/install index 47d8f26..42fa731 100755 --- a/scripts/install +++ b/scripts/install @@ -74,5 +74,5 @@ sudo duniter webstart # Add Duniter service to the YunoHost monitoring sudo yunohost service add $app --log /home/admin/.config/$app/"$app"_default/"$app".log -CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS -CONFIG_NGINX_FOR_WEB_ADMIN +CONFIG_SSOWAT +CONFIG_NGINX diff --git a/scripts/remove b/scripts/remove index 40b1e7a..289040c 100755 --- a/scripts/remove +++ b/scripts/remove @@ -20,7 +20,7 @@ sudo rm -rf /root/.conf/duniter # Remove Duniter service to YunoHost monitoring sudo yunohost service remove $app -# Remove proxy_pass +# Remove Nginx configuration sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf sudo service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade index 8647560..bc542a1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -26,5 +26,5 @@ INSTALL_DUNITER_DEBIAN_PACKAGE # Start duniter daemon sudo duniter webstart -CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS -CONFIG_NGINX_FOR_WEB_ADMIN +CONFIG_SSOWAT +CONFIG_NGINX