mirror of
https://github.com/YunoHost-Apps/tvheadend_ynh.git
synced 2024-10-01 13:34:50 +02:00
Change behaviour: use the standard /var/lib/tvheadend directory instead of a custom conf_dir
This commit is contained in:
parent
fc64b0e6a4
commit
0c3f23612f
4 changed files with 12 additions and 7 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
# systemd
|
# systemd
|
||||||
# See tvheadend --help for more - default "-u hts -g video"
|
# 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
|
# sysvinit
|
||||||
#
|
#
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
# systemd
|
# systemd
|
||||||
# See tvheadend --help for more - default "-u hts -g video"
|
# 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
|
# sysvinit
|
||||||
#
|
#
|
||||||
|
|
|
@ -36,8 +36,6 @@ ynh_systemd_action --service_name="$app" --action="stop"
|
||||||
ynh_script_progression --message="Update configuration files..." --weight=1
|
ynh_script_progression --message="Update configuration files..." --weight=1
|
||||||
|
|
||||||
# Copy and modify /etc/default/tvheadend
|
# 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
|
if [ "$path" = "/" ]; then
|
||||||
ynh_add_config --template="tvheadend_no_subpath" --destination="/etc/default/tvheadend"
|
ynh_add_config --template="tvheadend_no_subpath" --destination="/etc/default/tvheadend"
|
||||||
else
|
else
|
||||||
|
|
|
@ -21,7 +21,16 @@ ynh_systemd_action --service_name="$app" --action="stop"
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# 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
|
# 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
|
ynh_script_progression --message="Update configuration files..." --weight=1
|
||||||
|
|
||||||
# Copy and modify /etc/default/tvheadend
|
# 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
|
if [ "$path" = "/" ]; then
|
||||||
ynh_add_config --template="tvheadend_no_subpath" --destination="/etc/default/tvheadend"
|
ynh_add_config --template="tvheadend_no_subpath" --destination="/etc/default/tvheadend"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue