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:
parent
f6020c33c2
commit
283f1c0920
1 changed files with 10 additions and 1 deletions
|
@ -1,13 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Exit on command errors and treat unset variables as an error
|
# Exit on command errors and treat unset variables as an error
|
||||||
set -eu
|
set -e
|
||||||
|
#u
|
||||||
|
|
||||||
# Source app helpers
|
# Source app helpers
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Retrive arguments
|
# Retrive arguments
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
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)
|
arch=$(ynh_app_setting_get "$app" arch)
|
||||||
version=$(cat ../conf/upstream_version)
|
version=$(cat ../conf/upstream_version)
|
||||||
|
|
||||||
|
@ -29,6 +32,12 @@ sudo dpkg -i /tmp/duniter-$version-linux-$arch.deb
|
||||||
# Start duniter daemon
|
# Start duniter daemon
|
||||||
sudo $app webstart
|
sudo $app webstart
|
||||||
|
|
||||||
|
# Remove trailing "/" for next command
|
||||||
|
path=${path%/}
|
||||||
|
|
||||||
|
# SSOwat Configuration
|
||||||
|
ynh_app_setting_set "$app" unprotected_uris "/"
|
||||||
|
|
||||||
# Upgrade Nginx configuration
|
# Upgrade Nginx configuration
|
||||||
nginx_conf="../conf/nginx.conf"
|
nginx_conf="../conf/nginx.conf"
|
||||||
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" $nginx_conf
|
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" $nginx_conf
|
||||||
|
|
Loading…
Add table
Reference in a new issue