mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
do not enable a service disabled by the user
This commit is contained in:
parent
d5e054fe80
commit
266408e235
1 changed files with 9 additions and 1 deletions
|
@ -25,7 +25,10 @@ ynh_add_systemd_config() {
|
||||||
|
|
||||||
ynh_add_config --template="$template" --destination="/etc/systemd/system/$service.service"
|
ynh_add_config --template="$template" --destination="/etc/systemd/system/$service.service"
|
||||||
|
|
||||||
systemctl enable $service --quiet
|
# do not enable a service disabled by the user
|
||||||
|
if ! yunohost service status $service | grep -q "start_on_boot: disabled"; then
|
||||||
|
systemctl enable $service --quiet
|
||||||
|
fi
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +91,11 @@ ynh_systemd_action() {
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# do not start a service disabled by the user
|
||||||
|
if [ "$action" == "start" ] && ! yunohost service status $service_name | grep -q "start_on_boot: disabled"; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Start to read the log
|
# Start to read the log
|
||||||
if [[ -n "$line_match" ]]; then
|
if [[ -n "$line_match" ]]; then
|
||||||
local templog="$(mktemp)"
|
local templog="$(mktemp)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue