mirror of
https://github.com/YunoHost-Apps/mopidy_ynh.git
synced 2024-09-03 19:46:21 +02:00
use helper ynh_add_config
This commit is contained in:
parent
fb9c1e44f2
commit
0031539841
1 changed files with 11 additions and 10 deletions
|
@ -95,10 +95,6 @@ ynh_script_progression --message="Configuring NGINX web server..."
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
#=================================================
|
||||
# CREATE YUNOHOST DIRECTORIES
|
||||
#=================================================
|
||||
|
@ -116,7 +112,7 @@ chown -R $app: "$work_dir"
|
|||
ynh_script_progression --message="Configuring a systemd service..."
|
||||
|
||||
# Create a dedicated systemd config
|
||||
start_file="$final_path/env/bin/$app"
|
||||
#start_file="$final_path/env/bin/$app"
|
||||
ynh_add_systemd_config #--others_var="conf_file start_file" substitute __CONF_FILE__ by $conf_file
|
||||
|
||||
#=================================================
|
||||
|
@ -124,12 +120,17 @@ ynh_add_systemd_config #--others_var="conf_file start_file" substitute __CO
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setup config file..."
|
||||
|
||||
cp ../conf/app.conf "$conf_file"
|
||||
cache_dir=$work_dir/cache
|
||||
data_dir=$work_dir/data
|
||||
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string=$port --target_file="$conf_file"
|
||||
ynh_replace_string --match_string="__MEDIADIR__" --replace_string=$media_dir --target_file="$conf_file"
|
||||
ynh_replace_string --match_string="__CACHE_DIR__" --replace_string=$work_dir/cache --target_file="$conf_file"
|
||||
ynh_replace_string --match_string="__DATA_DIR__" --replace_string=$work_dir/data --target_file="$conf_file"
|
||||
ynh_add_config --template="../conf/app.conf" --destination="$conf_file"
|
||||
|
||||
#cp ../conf/app.conf "$conf_file"
|
||||
|
||||
#ynh_replace_string --match_string="__PORT__" --replace_string=$port --target_file="$conf_file"
|
||||
#ynh_replace_string --match_string="__MEDIADIR__" --replace_string=$media_dir --target_file="$conf_file"
|
||||
#ynh_replace_string --match_string="__CACHE_DIR__" --replace_string=$work_dir/cache --target_file="$conf_file"
|
||||
#ynh_replace_string --match_string="__DATA_DIR__" --replace_string=$work_dir/data --target_file="$conf_file"
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
|
|
Loading…
Add table
Reference in a new issue