rm services not in services.txt
This commit is contained in:
parent
0a6d8f7b63
commit
43832f11bb
1 changed files with 4 additions and 12 deletions
16
bootstrap.sh
16
bootstrap.sh
|
@ -194,18 +194,10 @@ select_keymap() {
|
|||
}
|
||||
|
||||
enable_services() {
|
||||
# tput sc
|
||||
# info "Installing user service service..."
|
||||
# target="/etc/sv/runsvdir-${username}"
|
||||
# mkdir -p "$target"
|
||||
# sed "s/<U>/$username/" "${SCRIPT_DIR}/runsvdir-user" >"$target/run"
|
||||
# [ ! -L "/var/service/$(basename "$target")" ] &&
|
||||
# ln -s "$target" "/var/service/"
|
||||
# chmod 755 "$target"
|
||||
# chmod 755 "$target/run"
|
||||
# tput rc
|
||||
# tput el
|
||||
#shellcheck disable=SC2016
|
||||
for sv in /var/service/*; do
|
||||
grep -qx "$(basename "$sv")" services.txt || rm "$sv"
|
||||
done
|
||||
# shellcheck disable=2016
|
||||
_loop_wrapper "$1" \
|
||||
'Enabling ${x} service' \
|
||||
'[ ! -L /var/service/${x} ] && ln -s "/etc/sv/${x}" "/var/service/"'
|
||||
|
|
Reference in a new issue