mirror of
https://github.com/YunoHost-Apps/mytinytodo_ynh.git
synced 2024-09-03 19:46:01 +02:00
Correction sur le script upgrade
This commit is contained in:
parent
1e8760d2b1
commit
bc9e99283f
1 changed files with 30 additions and 7 deletions
|
@ -34,8 +34,11 @@ db_name=$(ynh_app_setting_get $app db_name)
|
||||||
|
|
||||||
sudo yunohost app checkurl "${domain}${path_url}" -a "$app" \
|
sudo yunohost app checkurl "${domain}${path_url}" -a "$app" \
|
||||||
|| ynh_die "Path not available: ${domain}${path_url}"
|
|| ynh_die "Path not available: ${domain}${path_url}"
|
||||||
test ! -d $final_path \
|
|
||||||
|| ynh_die "There is already a directory: $final_path "
|
# Mise en commentaire, c'est une mise a jour, le repertoire
|
||||||
|
# existe c'est normal, donc le controle n'est pas judicieux.
|
||||||
|
#test ! -d $final_path \
|
||||||
|
# || ynh_die "There is already a directory: $final_path "
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORE STEPS
|
# STANDARD RESTORE STEPS
|
||||||
|
@ -43,11 +46,11 @@ test ! -d $final_path \
|
||||||
# RESTORE OF THE NGINX CONFIGURATION
|
# RESTORE OF THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
conf=/etc/nginx/conf.d/$domain.d/$app.conf
|
#conf=/etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
if [ -f $conf ]; then
|
#if [ -f $conf ]; then
|
||||||
ynh_die "There is already a nginx conf file at this path: $conf "
|
# ynh_die "There is already a nginx conf file at this path: $conf "
|
||||||
fi
|
#fi
|
||||||
sudo cp -a ./nginx.conf $conf
|
#sudo cp -a ./nginx.conf $conf
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE OF THE MAIN DIR OF THE APP
|
# RESTORE OF THE MAIN DIR OF THE APP
|
||||||
|
@ -83,8 +86,27 @@ ynh_system_user_create $app # Recreate the dedicated user, if not exist
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Les fichiers appartiennent à l'user wordpress, pour permettre les mises à jour.
|
# Les fichiers appartiennent à l'user wordpress, pour permettre les mises à jour.
|
||||||
|
|
||||||
|
sudo rm -f $final_path/setup.php
|
||||||
|
sudo rm -f $final_path/db/todolist.db
|
||||||
|
sudo chmod o+w $final_path/db/config.php
|
||||||
|
sudo chmod o+w $final_path/tmp/sessions
|
||||||
sudo chown -R $app: $final_path
|
sudo chown -R $app: $final_path
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP SSOWAT
|
||||||
|
#=================================================
|
||||||
|
ynh_app_setting_set $app unprotected_uris "/"
|
||||||
|
|
||||||
|
# 0 : pas d'acces publique
|
||||||
|
# 1 : acces publique autorise
|
||||||
|
|
||||||
|
if [ $is_public -eq 0 ];
|
||||||
|
then
|
||||||
|
# Retire l'accès public
|
||||||
|
ynh_app_setting_delete $app unprotected_uris
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALISATION
|
# GENERIC FINALISATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -92,3 +114,4 @@ sudo chown -R $app: $final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
sudo systemctl reload nginx
|
sudo systemctl reload nginx
|
||||||
|
sudo yunohost app ssowatconf
|
||||||
|
|
Loading…
Reference in a new issue