examples/service/runit-run (507 bytes)
1 #!/bin/sh 2 # runit service for distros without systemd (Void, KISS, Artix). 3 # Install as root: mkdir /etc/sv/aicr-watch.USER && cp runit-run /etc/sv/aicr-watch.USER/run 4 # && chmod +x /etc/sv/aicr-watch.USER/run && ln -s /etc/sv/aicr-watch.USER /var/service/ 5 # Replace USER below with your login name. 6 USER=user 7 HOME=/home/$USER 8 exec chpst -u "$USER:$USER" env HOME="$HOME" PATH="$HOME/.local/bin:/usr/bin:/bin" \ 9 aicr watch --source "$HOME/ai-config" --remote-every 20 --exec "sh commit-and-push.sh" 2>&1