parent
429c209837
commit
cdc6e7ad77
10
bootstrap.sh
10
bootstrap.sh
|
@ -194,6 +194,16 @@ 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"
|
||||
tput rc
|
||||
tput el
|
||||
#shellcheck disable=SC2016
|
||||
_loop_wrapper "$1" \
|
||||
'Enabling ${x} service' \
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
export USER="<U>"
|
||||
export HOME="/home/<U>"
|
||||
|
||||
groups="$(id -Gn "$USER" | tr ' ' ':')"
|
||||
svdir="$HOME/.local/sv/"
|
||||
|
||||
exec chpst -u "$USER:$groups" runsvdir "$svdir"
|
Loading…
Reference in New Issue