commit 4780b669656d9705deb8e115b87f897b9f0bf042 parent 42ee4270fa5325eeeffbd0b2dbe69e3acbcf63ef Author: zerous Naveen Narayanan <zerous@nocebo.space> Date: Sat, 9 Nov 2019 20:24:07 +0100 Add a script to setup runit service Diffstat:
M | Makefile | | | 5 | ++++- |
A | mksrv | | | 10 | ++++++++++ |
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile @@ -3,7 +3,10 @@ all: slb slb: config.h gcc -Wall -Werror -std=c99 -o slb slb.c -.PHONY: clean +.PHONY: clean service clean: rm -f slb 2>/dev/null + +service: + sh ./mksrv diff --git a/mksrv b/mksrv @@ -0,0 +1,10 @@ +#!/bin/sh + +umask 022 +mkdir /etc/sv/slb +cat <<EOF >/etc/sv/slb/run +#!/bin/sh +exec /bin/slb +EOF +chmod 755 /etc/sv/slb/run +ln -s /etc/sv/slb /var/service/