Téléverser les fichiers vers "scripts"
This commit is contained in:
parent
726f233906
commit
00f9eece9a
2 changed files with 25 additions and 0 deletions
10
scripts/restore
Normal file
10
scripts/restore
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
source ../settings/scripts/_common.sh
|
||||||
|
ynh_restore "$install_dir"
|
||||||
|
ynh_restore "$data_dir"
|
||||||
|
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
||||||
|
chown -R "$app:$app" "$install_dir" "$data_dir"
|
||||||
|
ynh_exec_as_app php "$install_dir/scripts/migrate.php"
|
||||||
|
ynh_systemctl --service=php8.2-fpm --action=reload
|
||||||
|
ynh_systemctl --service=nginx --action=reload
|
||||||
15
scripts/upgrade
Normal file
15
scripts/upgrade
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
source _common.sh
|
||||||
|
if [[ -f "$install_dir/scripts/backup.php" && -f "$data_dir/refuge.sqlite" ]]; then
|
||||||
|
ynh_exec_as_app php "$install_dir/scripts/backup.php" pre-upgrade-yunohost
|
||||||
|
fi
|
||||||
|
touch "$data_dir/storage/maintenance.flag"
|
||||||
|
trap 'rm -f "$data_dir/storage/maintenance.flag"' EXIT
|
||||||
|
ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="data storage public/media"
|
||||||
|
prepare_persistent_paths
|
||||||
|
ynh_config_add_phpfpm
|
||||||
|
ynh_config_add_nginx
|
||||||
|
ynh_exec_as_app php "$install_dir/scripts/migrate.php"
|
||||||
|
rm -f "$data_dir/storage/maintenance.flag"
|
||||||
|
trap - EXIT
|
||||||
|
ynh_systemctl --service=php8.2-fpm --action=reload
|
||||||
Loading…
Add table
Add a link
Reference in a new issue