mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
f039b6f710
The shift to 2.4 is not finished though ; still TODO : - backup/restore scripts - use of the helpers ? - remove deprecated yunohost commands
33 lines
948 B
Bash
Executable file
33 lines
948 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
# Source YunoHost helpers
|
|
. /usr/share/yunohost/helpers
|
|
|
|
# Optionaly upgrade arg to typed boolean form
|
|
|
|
is_public=$(ynh_app_setting_get "$app" is_public)
|
|
if [[ "$is_public" = "" ]];
|
|
then
|
|
if [ $public_site = "No" ];
|
|
then
|
|
is_public=0
|
|
else
|
|
is_public=1
|
|
fi
|
|
ynh_app_setting_set "$app" is_public "$is_public"
|
|
fi
|
|
|
|
# Upgrade code
|
|
sudo cp -r ../sources/ /opt/yunohost/ihatemoney/src/
|
|
sudo find /opt/yunohost/ihatemoney/src/ -type f | while read LINE; do sudo chmod 640 "$LINE" ; done
|
|
sudo find /opt/yunohost/ihatemoney/src/ -type d | while read LINE; do sudo chmod 755 "$LINE" ; done
|
|
sudo chown -R ihatemoney:ihatemoney /opt/yunohost/ihatemoney/src
|
|
sudo chown -R www-data:www-data /opt/yunohost/ihatemoney/src/budget/static
|
|
|
|
# Settings are not very likely to change, and that script may be
|
|
# adapted to handle it in case.
|
|
|
|
# Restart backend
|
|
sudo supervisorctl restart budget
|