You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
764 B
28 lines
764 B
#!/usr/bin/env bash
|
|
|
|
SERVICES=${SERVICES:-one-context one-context-online one-context-local}
|
|
|
|
# Disable services
|
|
if which systemctl >/dev/null 2>&1 && [ -d /etc/systemd ]; then
|
|
for S in ${SERVICES}; do
|
|
systemctl --no-reload disable "${S}.service" >/dev/null 2>&1 || :
|
|
systemctl stop "${S}.service" >/dev/null 2>&1 || :
|
|
done
|
|
fi
|
|
|
|
if which chkconfig >/dev/null 2>&1; then
|
|
for S in ${SERVICES}; do
|
|
chkconfig --del "${S}" >/dev/null 2>&1 || :
|
|
done
|
|
|
|
elif which update-rc.d >/dev/null 2>&1; then
|
|
for S in ${SERVICES}; do
|
|
update-rc.d -f "${S}" remove >/dev/null 2>&1 || :
|
|
done
|
|
|
|
elif which rc-update >/dev/null 2>&1; then
|
|
for S in ${SERVICES}; do
|
|
rc-update del "${S}" boot >/dev/null 2>&1 || :
|
|
done
|
|
fi
|