mirror of
https://github.com/YunoHost-Apps/timeoff_ynh.git
synced 2024-09-03 20:35:59 +02:00
Fix
This commit is contained in:
parent
5059829c8b
commit
d10eae0f4a
3 changed files with 18 additions and 6 deletions
|
@ -32,7 +32,6 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
ynh_script_progression --message="Validating installation parameters..."
|
||||
|
||||
final_path=/var/www/$app
|
||||
config_path=/home/yunohost.app/$app
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
# Register (book) web path
|
||||
|
@ -105,6 +104,20 @@ chmod -R o-rwx "$final_path"
|
|||
chown -R $app:www-data "$final_path"
|
||||
#chmod -R +x "$final_path/bin"
|
||||
|
||||
#=================================================
|
||||
# CREATE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating a data directory..." --weight=1
|
||||
|
||||
datadir=/home/yunohost.app/$app
|
||||
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
|
||||
|
||||
mkdir -p $datadir
|
||||
|
||||
chmod 750 "$datadir"
|
||||
chmod -R o-rwx "$datadir"
|
||||
chown -R $app:www-data "$datadir"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -136,7 +149,7 @@ ynh_script_progression --message="Installing TimeOff..."
|
|||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
npm install -g npm
|
||||
ynh_exec_warn_less $ynh_npm install
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -34,8 +34,7 @@ db_user=$db_name
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
|
|
|
@ -113,8 +113,8 @@ then
|
|||
ynh_script_progression --message="Upgrading the lounge..."
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less NODE_ENV=production npm cache clean
|
||||
ynh_exec_warn_less NODE_ENV=production npm update
|
||||
ynh_exec_warn_less $ynh_npm cache clean
|
||||
ynh_exec_warn_less $ynh_npm update
|
||||
popd
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue