mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
replacing __DOMAIN__ and __URI__ by __DOMAIN_URI__ to have one ynh_replace_string instead of two
This commit is contained in:
parent
e40a3ab65c
commit
58ed2f08de
3 changed files with 4 additions and 7 deletions
|
@ -10,7 +10,7 @@ Group=__APP__
|
|||
Environment="PATH=__ENV_PATH__"
|
||||
Environment=NODE_ENV=production
|
||||
Environment=MONGO_URL=mongodb://127.0.0.1:27017/__DB_NAME__
|
||||
Environment=ROOT_URL=https://__DOMAIN____URI__ PORT=__PORT__
|
||||
Environment=ROOT_URL=https://__DOMAIN_URI__ PORT=__PORT__
|
||||
WorkingDirectory=__FINALPATH__
|
||||
ExecStart=/opt/node_n/bin/node __FINALPATH__/main.js
|
||||
Restart=on-failure
|
||||
|
|
|
@ -189,9 +189,8 @@ popd
|
|||
ynh_print_info "Adding wekan systemd service ..."
|
||||
ynh_replace_string "__ENV_PATH__" "$nodejs_path" "../conf/systemd.service"
|
||||
ynh_replace_string "__DB_NAME__" "$db_name" "../conf/systemd.service"
|
||||
ynh_replace_string "__URI__" "$path_url" "../conf/systemd.service"
|
||||
ynh_replace_string "__DOMAIN_URI__" "$domain$path_url" "../conf/systemd.service"
|
||||
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "../conf/systemd.service"
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -70,9 +70,8 @@ if ynh_version_gt "0.77-2" "${previous_version}" ; then
|
|||
# Create a dedicated systemd config
|
||||
ynh_replace_string "__ENV_PATH__" "$nodejs_path" "../conf/systemd.service"
|
||||
ynh_replace_string "__DB_NAME__" "$db_name" "../conf/systemd.service"
|
||||
ynh_replace_string "__URI__" "$path_url/" "../conf/systemd.service"
|
||||
ynh_replace_string "__DOMAIN_URI__" "$domain$path_url" "../conf/systemd.service"
|
||||
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "../conf/systemd.service"
|
||||
ynh_add_systemd_config
|
||||
fi
|
||||
|
||||
|
@ -90,9 +89,8 @@ if ynh_version_gt "1.07~ynh2" "${previous_version}" ; then
|
|||
# Gotta regen the systemd config because mongodb service name changed
|
||||
ynh_replace_string "__ENV_PATH__" "$nodejs_path" "../conf/systemd.service"
|
||||
ynh_replace_string "__DB_NAME__" "$db_name" "../conf/systemd.service"
|
||||
ynh_replace_string "__URI__" "$path_url/" "../conf/systemd.service"
|
||||
ynh_replace_string "__DOMAIN_URI__" "$domain$path_url" "../conf/systemd.service"
|
||||
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "../conf/systemd.service"
|
||||
ynh_add_systemd_config
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue