mirror of
https://github.com/YunoHost-Apps/framagames_ynh.git
synced 2024-09-03 18:36:28 +02:00
Removal of trainiling / for path
This commit is contained in:
parent
470da8ce10
commit
9b36c3d5eb
1 changed files with 9 additions and 9 deletions
|
@ -6,19 +6,22 @@ domain=$1
|
||||||
path=$2
|
path=$2
|
||||||
is_public=$3
|
is_public=$3
|
||||||
|
|
||||||
# Removal of trailing /
|
|
||||||
path=${path%/}
|
|
||||||
|
|
||||||
# sitename == path without "/"
|
|
||||||
sitename=$(echo $path | cut -d '/' -f 2)
|
|
||||||
|
|
||||||
if [ $path = "/" ]
|
if [ $path = "/" ]
|
||||||
then
|
then
|
||||||
sitename="root"
|
sitename="root"
|
||||||
|
sudo yunohost app setting $app path -v $path
|
||||||
|
else
|
||||||
|
# sitename == path without any "/"
|
||||||
|
sitename=$(echo $path | cut -d '/' -f 2)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
final_path=/var/www/webapp\_multi/$domain/$sitename
|
final_path=/var/www/webapp\_multi/$domain/$sitename
|
||||||
|
|
||||||
|
sudo yunohost app setting $app path -v $path
|
||||||
|
|
||||||
|
# Removal of trailing /
|
||||||
|
# path can be null but not really an issue for the following commands
|
||||||
|
path=${path%/}
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl $domain$path -a $app
|
sudo yunohost app checkurl $domain$path -a $app
|
||||||
|
@ -28,7 +31,6 @@ fi
|
||||||
|
|
||||||
sudo yunohost app setting $app final_path -v $final_path
|
sudo yunohost app setting $app final_path -v $final_path
|
||||||
sudo yunohost app setting $app domain -v $domain
|
sudo yunohost app setting $app domain -v $domain
|
||||||
sudo yunohost app setting $app path -v $path
|
|
||||||
sudo yunohost app setting $app sitename -v $sitename
|
sudo yunohost app setting $app sitename -v $sitename
|
||||||
|
|
||||||
# Creation of folder
|
# Creation of folder
|
||||||
|
@ -56,8 +58,6 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$sitename.conf
|
||||||
if [ $is_public = "Yes" ];
|
if [ $is_public = "Yes" ];
|
||||||
then
|
then
|
||||||
sudo yunohost app setting $app unprotected_uris -v "/"
|
sudo yunohost app setting $app unprotected_uris -v "/"
|
||||||
#else
|
|
||||||
# sudo yunohost app setting $app protected_uris -v "/"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Reload Nginx and regenerate SSOwat conf
|
# Reload Nginx and regenerate SSOwat conf
|
||||||
|
|
Loading…
Add table
Reference in a new issue