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

[mod] package cleannings.

This commit is contained in:
Moul 2017-03-14 09:41:28 +01:00
parent 3ecb69de8f
commit 6fa1bb77ba
4 changed files with 8 additions and 9 deletions

View file

@ -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 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 # Add admin to the allowed users
sudo yunohost app addaccess $app -u $admin sudo yunohost app addaccess $app -u $admin
# Allow only allowed users to access admin panel # Allow only allowed users to access admin panel
if [ "$is_cesium_public" = "Yes" ]; if [ "$is_cesium_public" = "Yes" ]; then
then
# Cesium is public, do not protect it # Cesium is public, do not protect it
ynh_app_setting_set "$app" protected_uris "/webui","/webmin" ynh_app_setting_set "$app" protected_uris "/webui","/webmin"
else else
@ -37,7 +36,7 @@ ynh_app_setting_set "$app" unprotected_uris "/"
ynh_app_setting_set "$app" redirected_urls "{'$domain/':'$domain/webui'}" ynh_app_setting_set "$app" redirected_urls "{'$domain/':'$domain/webui'}"
} }
CONFIG_NGINX_FOR_WEB_ADMIN () { CONFIG_NGINX () {
# Configure Nginx # Configure Nginx
nginx_conf="../conf/nginx.conf" nginx_conf="../conf/nginx.conf"
sudo sed -i "s@YNH_EXAMPLE_PORT@$port@" $nginx_conf sudo sed -i "s@YNH_EXAMPLE_PORT@$port@" $nginx_conf

View file

@ -74,5 +74,5 @@ sudo duniter webstart
# Add Duniter service to the YunoHost monitoring # Add Duniter service to the YunoHost monitoring
sudo yunohost service add $app --log /home/admin/.config/$app/"$app"_default/"$app".log sudo yunohost service add $app --log /home/admin/.config/$app/"$app"_default/"$app".log
CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS CONFIG_SSOWAT
CONFIG_NGINX_FOR_WEB_ADMIN CONFIG_NGINX

View file

@ -20,7 +20,7 @@ sudo rm -rf /root/.conf/duniter
# Remove Duniter service to YunoHost monitoring # Remove Duniter service to YunoHost monitoring
sudo yunohost service remove $app sudo yunohost service remove $app
# Remove proxy_pass # Remove Nginx configuration
sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
sudo service nginx reload sudo service nginx reload

View file

@ -26,5 +26,5 @@ INSTALL_DUNITER_DEBIAN_PACKAGE
# Start duniter daemon # Start duniter daemon
sudo duniter webstart sudo duniter webstart
CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS CONFIG_SSOWAT
CONFIG_NGINX_FOR_WEB_ADMIN CONFIG_NGINX