neodotfiles/system/etc/sv/runsvdir-drk/run
2023-10-21 09:44:39 -04:00

14 lines
329 B
Bash
Executable file

#!/bin/sh
export USER="drk"
export HOME="/home/$USER"
export XDG_RUNTIME_DIR="/run/user/$(id -u $USER)"
mkdir $XDG_RUNTIME_DIR
chown $USER:$USER $XDG_RUNTIME_DIR
groups="$(id -Gn "$USER" | tr ' ' ':')"
svdir="$HOME/.config/services"
mkdir -p "$svdir"
chown $USER:$USER "$svdir"
exec chpst -u "$USER:$groups" runsvdir "$svdir"