mirror of
https://github.com/YunoHost-Apps/tvheadend_ynh.git
synced 2024-10-01 13:34:50 +02:00
Use debconf-set-selections for superuser config file
This commit is contained in:
parent
52191a40f2
commit
52494315f2
4 changed files with 10 additions and 16 deletions
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"username": "__SUPERUSER__",
|
|
||||||
"password": "__PASSWORD__"
|
|
||||||
}
|
|
|
@ -100,6 +100,11 @@ ynh_exec_quiet "wget -q -O $tvheadend_deb_dst $tvheadend_deb_url"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing Tvheadend..." --weight=24
|
ynh_script_progression --message="Installing Tvheadend..." --weight=24
|
||||||
|
|
||||||
|
# Pre-seed debconf database with answers of the interactive dpkg
|
||||||
|
echo tvheadend tvheadend/admin_password password $password | debconf-set-selections
|
||||||
|
echo tvheadend tvheadend/admin_username string $superuser | debconf-set-selections
|
||||||
|
echo tvheadend tvheadend/last_notes note | debconf-set-selections
|
||||||
|
|
||||||
ynh_exec_warn_less DEBIAN_FRONTEND=noninteractive dpkg -i $tvheadend_deb_dst
|
ynh_exec_warn_less DEBIAN_FRONTEND=noninteractive dpkg -i $tvheadend_deb_dst
|
||||||
|
|
||||||
ynh_secure_remove --file="$temp_folder"
|
ynh_secure_remove --file="$temp_folder"
|
||||||
|
@ -125,12 +130,6 @@ else
|
||||||
ynh_add_config --template="tvheadend" --destination="/etc/default/tvheadend"
|
ynh_add_config --template="tvheadend" --destination="/etc/default/tvheadend"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Copy and modify /home/hts/.hts/tvheadend/superuser
|
|
||||||
ynh_add_config --template="superuser" --destination="${conf_dir}/superuser"
|
|
||||||
chown hts:video "${conf_dir}/superuser"
|
|
||||||
chmod 600 "${conf_dir}/superuser"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -91,6 +91,11 @@ ynh_exec_quiet "wget -q -O $tvheadend_deb_dst $tvheadend_deb_url"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing Tvheadend..." --weight=13
|
ynh_script_progression --message="Installing Tvheadend..." --weight=13
|
||||||
|
|
||||||
|
# Pre-seed debconf database with answers of the interactive dpkg
|
||||||
|
echo tvheadend tvheadend/admin_password password $password | debconf-set-selections
|
||||||
|
echo tvheadend tvheadend/admin_username string $superuser | debconf-set-selections
|
||||||
|
echo tvheadend tvheadend/last_notes note | debconf-set-selections
|
||||||
|
|
||||||
ynh_exec_warn_less DEBIAN_FRONTEND=noninteractive dpkg -i $tvheadend_deb_dst
|
ynh_exec_warn_less DEBIAN_FRONTEND=noninteractive dpkg -i $tvheadend_deb_dst
|
||||||
|
|
||||||
ynh_secure_remove --file="$temp_folder"
|
ynh_secure_remove --file="$temp_folder"
|
||||||
|
|
|
@ -114,12 +114,6 @@ then
|
||||||
else
|
else
|
||||||
ynh_add_config --template="tvheadend" --destination="/etc/default/tvheadend"
|
ynh_add_config --template="tvheadend" --destination="/etc/default/tvheadend"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy and modify /home/hts/.hts/tvheadend/superuser
|
|
||||||
ynh_add_config --template="superuser" --destination="${conf_dir}/superuser"
|
|
||||||
chown hts:video "${conf_dir}/superuser"
|
|
||||||
chmod 600 "${conf_dir}/superuser"
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue