From 871443008f5aca1a467cadaf6fb41def1ea10003 Mon Sep 17 00:00:00 2001 From: liberodark Date: Wed, 20 Feb 2019 12:22:52 +0100 Subject: [PATCH] update --- scripts/install | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index 3cc412e..1aab0f0 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,7 @@ app=$YNH_APP_INSTANCE_NAME ### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". ### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app" -final_path=/opt/yunohost/$app +final_path=/var/www/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" # Normalize the url path syntax @@ -66,6 +66,16 @@ ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url ynh_app_setting_set $app is_public $is_public +#============================================== +# INSTALL DEPS +#============================================== + +## Install the backports repo for debian +echo 'deb http://deb.debian.org/debian stretch-backports main' > \ + /etc/apt/sources.list.d/$app.list + +ynh_package_update + #================================================= # FIND AND OPEN A PORT #================================================= @@ -76,7 +86,7 @@ ynh_app_setting_set $app is_public $is_public ### - Remove the section "CLOSE A PORT" in the remove script # Find a free port -port=$(ynh_find_port 8096) +port=$(ynh_find_port 9090) # Open this port yunohost firewall allow --no-upnp TCP $port 2>&1 ynh_app_setting_set $app port $port @@ -85,15 +95,15 @@ ynh_app_setting_set $app port $port # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_app_setting_set $app final_path $final_path +#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" +#ynh_setup_source "$final_path" #============================================== -# INSTALL EMBY +# INSTALL COCKPIT #============================================== -dpkg --install $final_path/emby-server-deb* +ynh_package_install cockpit #================================================= # NGINX CONFIGURATION @@ -107,7 +117,7 @@ ynh_add_nginx_config #================================================= # Create a system user -ynh_system_user_create $app +#ynh_system_user_create $app #================================================= # MODIFY A CONFIG FILE @@ -140,7 +150,7 @@ ynh_system_user_create $app # Set permissions to app files #chown -R root: /etc/loolwsd - +rm /etc/apt/sources.list.d/$app.list #================================================= # SETUP SSOWAT @@ -153,4 +163,5 @@ if [ $is_public -eq 1 ]; then fi # Reload services -systemctl reload nginx +#systemctl enable --now cockpit +systemctl reload nginx