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

[fix] upgrade: access to web-ui.

- Disable set -u because of unbounding variable on $nginx_conf
- Retrieve domain and path arguments
- Remove trailling "/" on path var
- Grant access to /duniter path on the SSO
This commit is contained in:
Moul 2016-06-23 12:57:52 +00:00
parent f6020c33c2
commit 283f1c0920

View file

@ -1,13 +1,16 @@
#!/bin/bash
# Exit on command errors and treat unset variables as an error
set -eu
set -e
#u
# Source app helpers
source /usr/share/yunohost/helpers
# Retrive arguments
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get "$app" domain)
path=$(ynh_app_setting_get "$app" path)
arch=$(ynh_app_setting_get "$app" arch)
version=$(cat ../conf/upstream_version)
@ -29,6 +32,12 @@ sudo dpkg -i /tmp/duniter-$version-linux-$arch.deb
# Start duniter daemon
sudo $app webstart
# Remove trailing "/" for next command
path=${path%/}
# SSOwat Configuration
ynh_app_setting_set "$app" unprotected_uris "/"
# Upgrade Nginx configuration
nginx_conf="../conf/nginx.conf"
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" $nginx_conf