mirror of
https://github.com/YunoHost-Apps/cowyo_ynh.git
synced 2024-09-03 18:16:15 +02:00
[fix] upgrade
This commit is contained in:
parent
1874739d0c
commit
78622d6569
4 changed files with 7 additions and 13 deletions
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
__FINALPATH__/cowyo --port __PORT__ --host localhost
|
|
@ -7,7 +7,7 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
ExecStart=__FINALPATH__/__APP__.sh >> /var/log/__APP__.log 2>&1
|
||||
ExecStart=__FINALPATH__/cowyo --port __PORT__ --host localhost >> /var/log/__APP__.log 2>&1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -94,18 +94,12 @@ ynh_system_user_create $app
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..." --time --weight=1
|
||||
|
||||
# Set the systemd service settings
|
||||
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
||||
cp ../conf/__APP__.sh "$final_path/${app}.sh"
|
||||
ynh_replace_string "__PORT__" "$port" "$final_path/${app}.sh"
|
||||
ynh_replace_string "__FINALPATH__" "$final_path" "$final_path/${app}.sh"
|
||||
chmod +x "$final_path/${app}.sh"
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
#=================================================
|
||||
|
|
|
@ -140,6 +140,9 @@ ynh_use_logrotate --non-append
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1
|
||||
|
||||
# Set the systemd service settings
|
||||
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue