void-bash-installer/step3/90-services
2021-05-09 20:58:18 +02: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