From 208751bcb9bb1e6f2ceae122fbad46b3ceaadef0 Mon Sep 17 00:00:00 2001 From: Sylvain CECCHETTO Date: Thu, 30 Sep 2021 18:19:45 +0200 Subject: [PATCH] Fix no subpath config --- conf/nginx.conf | 2 +- conf/tvheadend_no_subpath | 61 +++++++++++++++++++++++++++++++++++++++ scripts/install | 8 ++++- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 conf/tvheadend_no_subpath diff --git a/conf/nginx.conf b/conf/nginx.conf index 3220221..cde63b0 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,4 @@ -location __PATH__/ { +location __PATH__ { # Path to source alias __FINALPATH__/ ; diff --git a/conf/tvheadend_no_subpath b/conf/tvheadend_no_subpath new file mode 100644 index 0000000..6458f58 --- /dev/null +++ b/conf/tvheadend_no_subpath @@ -0,0 +1,61 @@ +# +# Default configuration for tvheadend + +# systemd +# See tvheadend --help for more - default "-u hts -g video" +OPTIONS="-u hts -g video -c __CONF_DIR__ --http_port __PORT__ --htsp_port __STREAM_PORT__ -l /var/log/__APP__.log" + +# sysvinit +# +# Editing the following variables has no effect when using systemd +# modify the OPTIONS variable (above) instead. +# +# TVH_ENABLED +# set to 0 to disable upstart job +TVH_ENABLED=1 + +# TVH_USER +# if set to "" will run as root +TVH_USER="hts" + +# TVH_GROUP +# if set to "" will run as root +TVH_GROUP="video" + +# TVH_CONF_DIR +# if set to "" will use ~TVH_USER/.hts/tvheadend +TVH_CONF_DIR="" + +# TVH_ADAPTERS +# if set to "" will use all available adapters +# for select adapters use comma seperated list of adapter +# numbers, i.e. to use /dev/dvb/adapter0 and /dev/dvb/adapter1 only +# set as "0,1" +TVH_ADAPTERS="" + +# TVH_IPV6 +# if set to 1 will enable IPv6 support +TVH_IPV6=0 + +# TVH_HTTP_PORT +# if set to "" will use binary default +TVH_HTTP_PORT="" + +# TVH_HTTP_ROOT +# if set to "" will use binary default +# else will change the webui root context, useful for proxied +# servers +TVH_HTTP_ROOT="" + +# TVH_HTSP_PORT +# if set to "" will use binary default +TVH_HTSP_PORT="" + +# TVH_DEBUG +# if set to 1 will output debug to syslog +TVH_DEBUG=0 + +# TVH_ARGS +# add any other arguments +TVH_ARGS="" + diff --git a/scripts/install b/scripts/install index b55c13e..a679bb4 100644 --- a/scripts/install +++ b/scripts/install @@ -118,7 +118,13 @@ ynh_script_progression --message="Update configuration files..." --weight=1 # Copy and modify /etc/default/tvheadend conf_dir=$final_path/.hts/tvheadend ynh_app_setting_set --app=$app --key=conf_dir --value=$conf_dir -ynh_add_config --template="tvheadend" --destination="/etc/default/tvheadend" +if [ "$path_url" = "/" ] +then + ynh_add_config --template="tvheadend_no_subpath" --destination="/etc/default/tvheadend" +else + ynh_add_config --template="tvheadend" --destination="/etc/default/tvheadend" +fi + # Copy and modify /home/hts/.hts/tvheadend/superuser ynh_add_config --template="superuser" --destination="${conf_dir}/superuser"