mirror of
https://github.com/YunoHost-Apps/zwiicms_ynh.git
synced 2024-09-03 18:06:04 +02:00
Update from example_ynh
This commit is contained in:
parent
3670fea8ed
commit
c9496c5e5a
1 changed files with 10 additions and 7 deletions
|
@ -33,6 +33,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
#db_user=$db_name
|
#db_user=$db_name
|
||||||
|
#phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE RESTORED
|
# CHECK IF THE APP CAN BE RESTORED
|
||||||
|
@ -71,7 +72,7 @@ ynh_system_user_create --username=$app
|
||||||
# RESTORE USER RIGHTS
|
# RESTORE USER RIGHTS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files chown -R root: $final_path
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -83,12 +84,11 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE FAIL2BAN CONFIGURATION
|
# RESTORE FAIL2BAN CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
#ynh_script_progression --message="Restoring the fail2ban configuration..." --time --weight=1
|
#ynh_script_progression --message="Restoring the Fail2ban configuration..." --time --weight=1
|
||||||
|
|
||||||
#ynh_restore_file "/etc/fail2ban/jail.d/$app.conf"
|
#ynh_restore_file "/etc/fail2ban/jail.d/$app.conf"
|
||||||
#ynh_restore_file "/etc/fail2ban/filter.d/$app.conf"
|
#ynh_restore_file "/etc/fail2ban/filter.d/$app.conf"
|
||||||
#ynh_systemd_action --action=restart --service_name=fail2ban
|
#ynh_systemd_action --action=restart --service_name=fail2ban
|
||||||
#ynh_systemd_action --action=reload --service_name=fail2ban # Reload instead of restart for better performance
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
@ -115,13 +115,14 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
#ynh_script_progression --message="Restoring the systemd configuration..." --time --weight=1
|
#ynh_script_progression --message="Restoring the systemd configuration..." --time --weight=1
|
||||||
|
|
||||||
#ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
#ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||||
#systemctl enable $app.service
|
#systemctl enable $app.service --quiet
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
#ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1
|
||||||
|
|
||||||
#yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log"
|
#yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
@ -131,11 +132,13 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
#ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
#ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE CRON FILE
|
# RESTORE VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#ynh_restore_file --origin_path="/etc/cron.d/$app"
|
#ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||||
|
|
||||||
|
#ynh_restore_file --origin_path="/etc/$app/"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE LOGROTATE CONFIGURATION
|
# RESTORE THE LOGROTATE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -147,7 +150,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX AND PHP-FPM
|
# RELOAD NGINX AND PHP-FPM
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --time --weight=1
|
ynh_script_progression --message="Reloading NGINX web server and php-fpm..." --time --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
Loading…
Reference in a new issue