mirror of
https://github.com/YunoHost-Apps/rspamdui_ynh.git
synced 2024-09-03 20:16:32 +02:00
Support subdir. Fix remove and upgrade
This commit is contained in:
parent
9ee20f6378
commit
f64065de39
4 changed files with 8 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
location PATHTOCHANGE {
|
||||
location PATHTOCHANGE/ {
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ if [[ ! $? -eq 0 ]]; then
|
|||
fi
|
||||
|
||||
# Configure Nginx and reload
|
||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||
# Removing trailing '/' in path to handle both subdir and subdomain installs.
|
||||
sed -i "s@PATHTOCHANGE@${path%/}@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/rspamdui.conf
|
||||
sudo service nginx reload
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
domain=$(sudo yunohost app setting transmission domain)
|
||||
domain=$(sudo yunohost app setting rspamdui domain)
|
||||
|
||||
sudo rm /etc/nginx/conf.d/$domain.d/transmission.conf
|
||||
sudo rm /etc/nginx/conf.d/$domain.d/rspamdui.conf
|
||||
sudo service nginx reload
|
||||
sudo yunohost app ssowatconf
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Retrieve arguments
|
||||
domain=$(sudo yunohost app setting transmission domain)
|
||||
path=$(sudo yunohost app setting transmission path)
|
||||
domain=$(sudo yunohost app setting rspamdui domain)
|
||||
path=$(sudo yunohost app setting rspamdui path)
|
||||
|
||||
# Check port availability
|
||||
sudo yunohost app checkport 11334
|
||||
|
@ -11,6 +11,6 @@ if [[ ! $? -eq 0 ]]; then
|
|||
fi
|
||||
|
||||
# Configure Nginx and reload
|
||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||
sed -i "s@PATHTOCHANGE@${path%/}@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/rspamdui.conf
|
||||
sudo service nginx reload
|
||||
|
|
Loading…
Reference in a new issue