mirror of
https://github.com/YunoHost-Apps/bookwyrm_ynh.git
synced 2024-09-03 18:16:12 +02:00
cleanup + fix remove
This commit is contained in:
parent
d0e574b895
commit
51a332b2ed
1 changed files with 12 additions and 13 deletions
|
@ -9,7 +9,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -17,22 +16,22 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||||
if ynh_exec_warn_less yunohost service status "${app}-server" >/dev/null
|
if ynh_exec_warn_less yunohost service status "$app-server" >/dev/null
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Removing ${app}-server service integration..."
|
ynh_script_progression --message="Removing $app-server service integration..."
|
||||||
yunohost service remove "${app}-server"
|
yunohost service remove "$app-server"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ynh_exec_warn_less yunohost service status "${app}-worker" >/dev/null
|
if ynh_exec_warn_less yunohost service status "$app-worker" >/dev/null
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Removing ${app}-worker service integration..."
|
ynh_script_progression --message="Removing $app-worker service integration..."
|
||||||
yunohost service remove "${app}-worker"
|
yunohost service remove "$app-worker"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ynh_exec_warn_less yunohost service status "${app}-beat" >/dev/null
|
if ynh_exec_warn_less yunohost service status "$app-beat" >/dev/null
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Removing ${app}-beat service integration..."
|
ynh_script_progression --message="Removing $app-beat service integration..."
|
||||||
yunohost service remove "${app}-beat"
|
yunohost service remove "$app-beat"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -45,9 +44,9 @@ ynh_systemd_action --service_name="$app-server" --action="stop" --log_path="syst
|
||||||
ynh_systemd_action --service_name="$app-worker" --action="stop" --log_path="systemd" --line_match="Stopped $app"
|
ynh_systemd_action --service_name="$app-worker" --action="stop" --log_path="systemd" --line_match="Stopped $app"
|
||||||
|
|
||||||
# Remove the dedicated systemd config
|
# Remove the dedicated systemd config
|
||||||
ynh_remove_systemd_config --service="$app-beat" --log="/var/log/$app/$app-beat.log"
|
ynh_remove_systemd_config --service="$app-beat"
|
||||||
ynh_remove_systemd_config --service="$app-server" --log="/var/log/$app/$app.log"
|
ynh_remove_systemd_config --service="$app-server"
|
||||||
ynh_remove_systemd_config --service="$app-worker" --log="/var/log/$app/$app-worker.log"
|
ynh_remove_systemd_config --service="$app-worker"
|
||||||
|
|
||||||
ynh_secure_remove --file="/etc/systemd/system/$app.target"
|
ynh_secure_remove --file="/etc/systemd/system/$app.target"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue