Préparer le paquet Globinours 1.0.0-rc.3
This commit is contained in:
parent
00f9eece9a
commit
1a5401e30d
14 changed files with 53 additions and 40 deletions
8
scripts/_common.sh
Normal file → Executable file
8
scripts/_common.sh
Normal file → Executable file
|
|
@ -1,14 +1,20 @@
|
|||
#!/bin/bash
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
php_upload_max_filesize="250M"
|
||||
|
||||
prepare_persistent_paths() {
|
||||
mkdir -p "$data_dir/association" "$data_dir/grants" "$data_dir/medical-documents" \
|
||||
"$data_dir/private-media" "$data_dir/media" "$data_dir/storage/logs" \
|
||||
"$data_dir/storage/backups" "$data_dir/storage/releases"
|
||||
rm -rf "$install_dir/data" "$install_dir/storage" "$install_dir/public/media"
|
||||
ynh_safe_rm "$install_dir/data"
|
||||
ynh_safe_rm "$install_dir/storage"
|
||||
ynh_safe_rm "$install_dir/public/media"
|
||||
ln -s "$data_dir" "$install_dir/data"
|
||||
ln -s "$data_dir/storage" "$install_dir/storage"
|
||||
ln -s "$data_dir/media" "$install_dir/public/media"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
chown -R "$app:$app" "$data_dir"
|
||||
chmod -R u=rwX,g=rX,o= "$install_dir"
|
||||
chmod -R u=rwX,g=,o= "$data_dir"
|
||||
}
|
||||
|
|
|
|||
0
scripts/backup
Normal file → Executable file
0
scripts/backup
Normal file → Executable file
2
scripts/change_url
Normal file → Executable file
2
scripts/change_url
Normal file → Executable file
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
source _common.sh
|
||||
ynh_change_url_nginx_config
|
||||
ynh_config_change_url_nginx
|
||||
ynh_systemctl --service=nginx --action=reload
|
||||
|
|
|
|||
2
scripts/install
Normal file → Executable file
2
scripts/install
Normal file → Executable file
|
|
@ -6,4 +6,4 @@ prepare_persistent_paths
|
|||
ynh_config_add_phpfpm
|
||||
ynh_config_add_nginx
|
||||
ynh_exec_as_app php "$install_dir/scripts/migrate.php"
|
||||
ynh_systemctl --service=php8.2-fpm --action=reload
|
||||
ynh_systemctl --service="php$php_version-fpm" --action=reload
|
||||
|
|
|
|||
0
scripts/remove
Normal file → Executable file
0
scripts/remove
Normal file → Executable file
4
scripts/restore
Normal file → Executable file
4
scripts/restore
Normal file → Executable file
|
|
@ -4,7 +4,7 @@ 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"
|
||||
prepare_persistent_paths
|
||||
ynh_exec_as_app php "$install_dir/scripts/migrate.php"
|
||||
ynh_systemctl --service=php8.2-fpm --action=reload
|
||||
ynh_systemctl --service="php$php_version-fpm" --action=reload
|
||||
ynh_systemctl --service=nginx --action=reload
|
||||
|
|
|
|||
2
scripts/upgrade
Normal file → Executable file
2
scripts/upgrade
Normal file → Executable file
|
|
@ -12,4 +12,4 @@ 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
|
||||
ynh_systemctl --service="php$php_version-fpm" --action=reload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue