Disable systemd service
This commit is contained in:
parent
0141ec027b
commit
c730d36ed4
|
@ -70,14 +70,31 @@ procs running (with the pattern: ${RED}${local_proc_pattern}${COLOR_DEBUG}) on t
|
||||||
remove_cron() { # {{{
|
remove_cron() { # {{{
|
||||||
|
|
||||||
debug_message "remove_cron − \
|
debug_message "remove_cron − \
|
||||||
Try to remove cron jobs (autoupdate, benchmark,…)."
|
Try to remove maco's cron jobs (autoupdate, benchmark,…)."
|
||||||
|
|
||||||
# Remove default Maco cron that check updates
|
## Remove default Maco cron that check updates
|
||||||
rm -f /etc/cron.daily/ipr_autoupdate
|
rm -f /etc/cron.daily/ipr_autoupdate
|
||||||
|
|
||||||
# and benchmark
|
## and benchmark
|
||||||
rm -f /etc/cron.daily/ipr_benchmark
|
rm -f /etc/cron.daily/ipr_benchmark
|
||||||
|
|
||||||
|
}
|
||||||
|
# }}}
|
||||||
|
manage_systemd_service() { # {{{
|
||||||
|
|
||||||
|
maco_service_name="maco.service"
|
||||||
|
|
||||||
|
## If maco.service is enable
|
||||||
|
## Disable it at boot
|
||||||
|
systemctl --quiet is-enabled "${maco_service_name}" \
|
||||||
|
&& debug_message "manage_systemd_service − Try to disable ${maco_service_name}." \
|
||||||
|
&& systemctl --quiet disable "${maco_service_name}" > /dev/null 2>&1
|
||||||
|
|
||||||
|
## After a Maco's upgrade, the service should be set.
|
||||||
|
## If this upgrade require reboot, then the service should be run
|
||||||
|
## at the next boot
|
||||||
|
## It will be re-disable by this script after the upgrade.
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
main() { # {{{
|
main() { # {{{
|
||||||
|
@ -91,6 +108,8 @@ main() { # {{{
|
||||||
|
|
||||||
remove_cron
|
remove_cron
|
||||||
|
|
||||||
|
manage_systemd_service
|
||||||
|
|
||||||
}
|
}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue