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:
parent
3ecb69de8f
commit
6fa1bb77ba
4 changed files with 8 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue