Téléverser les fichiers vers "scripts"
This commit is contained in:
parent
548053fc8d
commit
726f233906
5 changed files with 37 additions and 0 deletions
14
scripts/_common.sh
Normal file
14
scripts/_common.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
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"
|
||||||
|
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"
|
||||||
|
}
|
||||||
6
scripts/backup
Normal file
6
scripts/backup
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
source ../settings/scripts/_common.sh
|
||||||
|
ynh_backup "$install_dir"
|
||||||
|
ynh_backup "$data_dir"
|
||||||
|
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
||||||
4
scripts/change_url
Normal file
4
scripts/change_url
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
source _common.sh
|
||||||
|
ynh_change_url_nginx_config
|
||||||
|
ynh_systemctl --service=nginx --action=reload
|
||||||
9
scripts/install
Normal file
9
scripts/install
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
source _common.sh
|
||||||
|
ynh_script_progression --message="Installation de Globinours..."
|
||||||
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
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
|
||||||
4
scripts/remove
Normal file
4
scripts/remove
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
source _common.sh
|
||||||
|
ynh_config_remove_nginx
|
||||||
|
ynh_config_remove_phpfpm
|
||||||
Loading…
Add table
Add a link
Reference in a new issue