diff --git a/conf/tvheadend b/conf/tvheadend index 197dcb7..0a0cc9a 100644 --- a/conf/tvheadend +++ b/conf/tvheadend @@ -3,7 +3,7 @@ # systemd # See tvheadend --help for more - default "-u hts -g video" -OPTIONS="-u hts -g video -c __CONF_DIR__ --http_port __PORT__ --http_root __PATH__ --htsp_port __PORT_STREAM__" +OPTIONS="-u hts -g video --http_port __PORT__ --http_root __PATH__ --htsp_port __PORT_STREAM__" # sysvinit # diff --git a/conf/tvheadend_no_subpath b/conf/tvheadend_no_subpath index a99b709..8266f68 100644 --- a/conf/tvheadend_no_subpath +++ b/conf/tvheadend_no_subpath @@ -3,7 +3,7 @@ # systemd # See tvheadend --help for more - default "-u hts -g video" -OPTIONS="-u hts -g video -c __CONF_DIR__ --http_port __PORT__ --htsp_port __PORT_STREAM__" +OPTIONS="-u hts -g video --http_port __PORT__ --htsp_port __PORT_STREAM__" # sysvinit # diff --git a/scripts/install b/scripts/install index 6d66241..6e360d6 100644 --- a/scripts/install +++ b/scripts/install @@ -36,8 +36,6 @@ ynh_systemd_action --service_name="$app" --action="stop" ynh_script_progression --message="Update configuration files..." --weight=1 # Copy and modify /etc/default/tvheadend -conf_dir=$install_dir/.hts/tvheadend -ynh_app_setting_set --app="$app" --key=conf_dir --value="$conf_dir" if [ "$path" = "/" ]; then ynh_add_config --template="tvheadend_no_subpath" --destination="/etc/default/tvheadend" else diff --git a/scripts/upgrade b/scripts/upgrade index 93c75ca..1807ad4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,16 @@ ynh_systemd_action --service_name="$app" --action="stop" #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -# ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +if [[ -n "${conf_dir:-}" ]]; then + # Now we use the standard /var/lib/tvheadend directory + ynh_secure_remove --file="$data_dir" + mv "$conf_dir" "$data_dir" + chown -R "hts:video" "$data_dir" + + ynh_app_setting_delete --app="$app" --key=conf_dir +fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -43,8 +52,6 @@ ynh_systemd_action --service_name="$app" --action="stop" ynh_script_progression --message="Update configuration files..." --weight=1 # Copy and modify /etc/default/tvheadend -conf_dir=$install_dir/.hts/tvheadend -ynh_app_setting_set --app="$app" --key=conf_dir --value="$conf_dir" if [ "$path" = "/" ]; then ynh_add_config --template="tvheadend_no_subpath" --destination="/etc/default/tvheadend" else