void-bash-installer/modules/90-services/install
2021-03-16 20:17:51 +01:00

25 lines
698 B
Plaintext

module start "services" "Enable and Disable services"
for i in "${services_enable[@]}"; do
[[ "${i}" == "dbus" ]] && dbus=1
done
if [[ "${#services_enable[@]}" -gt 0 ]]; then
test -z "${dbus}" || test -L /etc/runit/runsvdir/default/"${i}" || ln -s /etc/sv/"${i}" "${dest}"/etc/runit/runsvdir/default/
for i in "${services_enable[@]}"; do
#touch /etc/sv/"${i}"/down
test -h /etc/runit/runsvdir/default/"${i}" || ln -s /etc/sv/"${i}" "${dest}"/etc/runit/runsvdir/default/
done
fi
if [[ "${#services_disable[@]}" -gt 0 ]]; then
for i in "${services_disable[@]}"; do
test -h /etc/runit/runsvdir/default/"${i}" && rm -rf "${dest}"/etc/runit/runsvdir/default/"${i}"
done
fi
module end