mirror of
https://github.com/YunoHost-Apps/mytinytodo_ynh.git
synced 2024-09-03 19:46:01 +02:00
b600eb15ef
* 1.6.8 (#25) * 1.6.8 * Update updater.sh * Config panel (#30) * Update manifest.json * Auto-update README * Update config_panel.toml * 1.6.10 (#33) * 1.6.10 * Auto-update README Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Auto-update README * [autopatch] Add Common Platform Enumeration id to `manifest.json` (#35) Co-authored-by: Yunohost-Bot <> * set relative path for --keep opt (#36) * Update manifest.json * Auto-update README * Fix scripts order * 1.7.2 (#38) * 1.7.0 * Auto-update README * Update install * fix * Update install * Update mytinytodo.sql * Fix * Update install * Update restore * Update upgrade * Fix * 1.7.1 * Auto-update README * Fix * Fix * 1.7.2 * Update upgrade * Auto-update README * Update upgrade * Update upgrade Co-authored-by: yunohost-bot <yunohost@yunohost.org> * 1.7.3 * Auto-update README * Upgrade auto-updater (#46) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean <titus@pijean.ovh> * Version 2 (#47) * v2 * Auto-update README * v2 * Update restore --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Update manifest.toml * Auto-update README * cleaning * cleaning --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com> Co-authored-by: tituspijean <titus@pijean.ovh>
47 lines
1.6 KiB
Bash
47 lines
1.6 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source ../settings/scripts/_common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# RESTORE THE APP MAIN DIR
|
|
#=================================================
|
|
ynh_script_progression --message="Restoring the app main directory..." --weight=2
|
|
|
|
ynh_restore_file --origin_path="$install_dir"
|
|
|
|
chmod -R o-rwx "$install_dir"
|
|
chown -R $app:www-data "$install_dir"
|
|
|
|
#=================================================
|
|
# RESTORE THE PHP-FPM CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=2
|
|
|
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|
|
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
|
|
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql
|
|
|
|
#=================================================
|
|
# GENERIC FINALIZATION
|
|
#=================================================
|
|
# RELOAD NGINX AND PHP-FPM
|
|
#=================================================
|
|
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=2
|
|
|
|
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
|
ynh_systemd_action --service_name=nginx --action=reload
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Restoration completed for $app" --last
|