mirror of
https://github.com/YunoHost-Apps/mineweb_ynh.git
synced 2024-09-03 19:45:54 +02:00
* Update check_process * Set badge to SVG * Set badge to SVG * Upgrade to 1.12.0 (#3) * Upgrade to 1.13.0 (#5) * Fix linter warnings * Update manifest.json * Cleaning up (#8) * Cleaning up * Update database.php * [autopatch] Update issue and PR templates (#10) * Testing (#9) * Fix linter warnings * [autopatch] Update issue and PR templates Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> * Fix (#11) * Fix * Update upgrade * 1.14.1 * Auto-update README * 1.14.3 * Auto-update README * 1.14.5 * Auto-update README * Update manifest.json * 1.14.9 (#15) * 1.14.9 * Update manifest.json * Auto-update README * 4.3 (#17) * 1.15.1 * Auto-update README * Bullseye (#20) * set relative path for --keep opt * Auto-update README * Fix * Update restore * Update restore Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Update manifest.json * Auto-update README * Upgrade auto-updater (#22) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean <titus@pijean.ovh> * Version 2 (#23) * v2 * v2 * Auto-update README * fix * Update manifest.toml * Auto-update README * Update manifest.toml * Update backup --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Auto-update README * Update restore * cleaning --------- Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus@pijean.ovh>
52 lines
1.8 KiB
Bash
52 lines
1.8 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 MineWeb main directory..." --weight=4
|
|
|
|
ynh_restore_file --origin_path="$install_dir"
|
|
|
|
chmod -R o-rwx "$install_dir"
|
|
chown -R $app:www-data "$install_dir"
|
|
|
|
#=================================================
|
|
# RESTORE THE MYSQL DATABASE
|
|
#=================================================
|
|
ynh_script_progression --message="Restoring the MySQL database..." --weight=3
|
|
|
|
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
|
|
|
#=================================================
|
|
# RESTORE THE PHP-FPM CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1
|
|
|
|
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"
|
|
|
|
#=================================================
|
|
# 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
|