mirror of
https://github.com/YunoHost-Apps/pelican_ynh.git
synced 2024-09-03 19:46:35 +02:00
Appease linter
This commit is contained in:
parent
5f44511542
commit
c48b47104a
5 changed files with 23 additions and 11 deletions
|
@ -41,7 +41,6 @@ ram.runtime = "50M"
|
|||
ask.en = "Choose an author"
|
||||
ask.fr = "Choisissez l'auteur"
|
||||
type = "user"
|
||||
default = "John Doe"
|
||||
|
||||
[install.title]
|
||||
ask.en = "Choose a default title for your website"
|
||||
|
|
|
@ -64,7 +64,7 @@ ynh_add_nginx_config
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
yunohost service add $app --description="$app monitor, to automatically rebuild your website" --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --description="$app monitor, to automatically rebuild your website"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -10,11 +10,19 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
# REMOVE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..."
|
||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service integration..." --weight=1
|
||||
yunohost service remove $app
|
||||
fi
|
||||
|
||||
ynh_remove_systemd_config
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -13,12 +13,16 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
# RESTORE THE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
||||
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
yunohost service add $app --description="$app monitor, to automatically rebuild your website"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -32,11 +36,12 @@ chown -R $app:www-data "$install_dir"
|
|||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
# RELOAD SERVICES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
ynh_script_progression --message="Reloading services.."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
ynh_systemd_action --service_name=$app --action="start"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -83,7 +83,7 @@ ynh_add_nginx_config
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
yunohost service add $app --description="$app monitor, to automatically rebuild your website" --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --description="$app monitor, to automatically rebuild your website"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
@ -93,7 +93,7 @@ yunohost service add $app --description="$app monitor, to automatically rebuild
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action="start"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue