neodotfiles/etc/sv/runsvdir-drk/run
2024-11-02 07:02:51 -04:00

14 lines
334 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/runit/service"
mkdir -p "$svdir"
chown $USER:$USER "$svdir"
exec chpst -u "$USER:$groups" runsvdir "$svdir"