1
0
Fork 0
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:
tituspijean 2023-07-30 21:09:42 +02:00
parent 5f44511542
commit c48b47104a
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
5 changed files with 23 additions and 11 deletions

View file

@ -41,7 +41,6 @@ ram.runtime = "50M"
ask.en = "Choose an author" ask.en = "Choose an author"
ask.fr = "Choisissez l'auteur" ask.fr = "Choisissez l'auteur"
type = "user" type = "user"
default = "John Doe"
[install.title] [install.title]
ask.en = "Choose a default title for your website" ask.en = "Choose a default title for your website"

View file

@ -64,7 +64,7 @@ ynh_add_nginx_config
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_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 # GENERIC FINALIZATION

View file

@ -10,11 +10,19 @@ source _common.sh
source /usr/share/yunohost/helpers 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 ynh_remove_nginx_config
#================================================= #=================================================

View file

@ -13,12 +13,16 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# STANDARD RESTORATION STEPS # 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/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 # RESTORE THE APP MAIN DIR
#================================================= #=================================================
@ -32,11 +36,12 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# GENERIC FINALIZATION # 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=nginx --action=reload
ynh_systemd_action --service_name=$app --action="start"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -83,7 +83,7 @@ ynh_add_nginx_config
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_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 # 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 ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service # 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 # END OF SCRIPT