ref: master
pkgs/kaiowa/kaiowa.initd
#!/sbin/openrc-run name="kaiowa" description="a simple irc bot service" # Override these with /etc/conf.d/kaiowa KAIOWA_USER=${KAIOWA_USER:-kaiowa} LOGS=/var/log/kaiowa.log depend() { need net } start() { ebegin "Starting $name" touch "$LOGS" chown ${KAIOWA_USER} "$LOGS" start-stop-daemon \ -u ${KAIOWA_USER} \ -1 "$LOGS" \ -2 "$LOGS" \ --background \ --make-pidfile \ --pidfile /run/$name.pid \ --exec /usr/bin/python3 -- \ -m kaiowa eend $? } stop() { ebegin "Stopping $name" start-stop-daemon --stop --exec /usr/bin/python3 --pidfile /run/$name.pid eend $? }