From 428f8ead5dafea3e40fd8aace1145502435f4875 Mon Sep 17 00:00:00 2001 From: liberodark Date: Sat, 28 Sep 2019 04:34:16 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3ad3f7a..56291de 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,7 +11,7 @@ final_path=/opt/yunohost/$app source /usr/share/yunohost/helpers # Stop emby-server service -systemctl stop emby-server +systemctl stop matterbridge #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -21,12 +21,6 @@ ynh_app_setting_set $app final_path $final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" -#============================================== -# INSTALL PLEX -#============================================== - -dpkg --install $final_path/emby-server-deb* - #================================================= # NGINX CONFIGURATION #================================================= @@ -34,7 +28,6 @@ dpkg --install $final_path/emby-server-deb* # Create a dedicated nginx config #ynh_add_nginx_config - #================================================= # UPGRADE CONFIG #================================================= @@ -51,6 +44,19 @@ dpkg --install $final_path/emby-server-deb* # ynh_app_setting_set "$app" unprotected_uris "/" #fi -# Start emby-server service -systemctl start emby-server +#================================================= +# GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +### For security reason, any app should set the permissions to root: before anything else. +### Then, if write authorization is needed, any access should be given only to directories +### that really need such authorization. + +# Set permissions to app files +chown -R $app: $final_path + +# Start emby-server service +systemctl start matterbridge