mirror of
https://github.com/YunoHost-Apps/cockpit_ynh.git
synced 2024-09-03 18:16:26 +02:00
update
This commit is contained in:
parent
d94e7ca183
commit
871443008f
1 changed files with 20 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue