mirror of
https://github.com/YunoHost-Apps/minchat_ynh.git
synced 2024-09-03 19:36:29 +02:00
[fix] Bug remove/restore/upgrade
This commit is contained in:
parent
87d03acccf
commit
463d66421a
3 changed files with 19 additions and 0 deletions
|
@ -3,6 +3,11 @@
|
|||
# Exit on command errors and treat unset variables as an error
|
||||
set -u
|
||||
|
||||
if [ ! -e ._common ]; then
|
||||
# Get file fonction if not been to the current directory
|
||||
sudo cp ../settings/scripts/_common ./_common
|
||||
sudo chmod a+rx _common
|
||||
fi
|
||||
# Source app helpers
|
||||
source ./_common
|
||||
source /usr/share/yunohost/helpers
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||||
set -eu
|
||||
|
||||
if [ ! -e ._common ]; then
|
||||
# Get file fonction if not been to the current directory
|
||||
sudo cp ../settings/scripts/_common ./_common
|
||||
sudo chmod a+rx _common
|
||||
fi
|
||||
# Source app helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
@ -43,6 +48,9 @@ if [ -f $phpfpm_ini ]; then
|
|||
You should safely delete it before restoring this app."
|
||||
fi
|
||||
|
||||
# Create system user dedicace for this app
|
||||
ynh_system_user_create $app
|
||||
|
||||
# Restore sources & data
|
||||
sudo cp -a "./sources" $final_path
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
|
||||
if [ ! -e ._common ]; then
|
||||
# Get file fonction if not been to the current directory
|
||||
sudo cp ../settings/scripts/_common ./_common
|
||||
sudo chmod a+rx _common
|
||||
fi
|
||||
# Source app helpers
|
||||
source ./_common
|
||||
source /usr/share/yunohost/helpers
|
||||
|
|
Loading…
Reference in a new issue