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

Fix _common.sh

This commit is contained in:
Salamandar 2024-03-19 22:02:20 +01:00
parent 69902eb84c
commit 50cd1ca6e5

View file

@ -56,14 +56,6 @@ check_memory_requirements_upgrade() {
}
ynh_maintenance_mode_ON () {
# Load value of $path and $domain from the config if their not set
if [ -z $path ]; then
#REMOVEME? path=$(ynh_app_setting_get $app path)
fi
if [ -z $domain ]; then
#REMOVEME? domain=$(ynh_app_setting_get $app domain)
fi
# Create an html to serve as maintenance notice
echo "<!DOCTYPE html>
<html>
@ -110,14 +102,6 @@ include conf.d/yunohost_panel.conf.inc;
}
ynh_maintenance_mode_OFF () {
# Load value of $path and $domain from the config if their not set
if [ -z $path ]; then
#REMOVEME? path=$(ynh_app_setting_get $app path)
fi
if [ -z $domain ]; then
#REMOVEME? domain=$(ynh_app_setting_get $app domain)
fi
# Rewrite the nginx config file to redirect from ${path}_maintenance to the real url of the app.
echo "rewrite ^${path}_maintenance/(.*)$ ${path}/\$1 redirect;" > "/etc/nginx/conf.d/$domain.d/maintenance.$app.conf"
systemctl reload nginx