From f0df46c88a9854cbb46221ac6d076e6062a9efc1 Mon Sep 17 00:00:00 2001 From: Vasily Mikhaylichenko Date: Sat, 2 Jul 2016 00:24:41 +1000 Subject: [PATCH] Add an OpenBSD daemon control script (#3060) --- scripts/init/openbsd/gogs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/init/openbsd/gogs diff --git a/scripts/init/openbsd/gogs b/scripts/init/openbsd/gogs new file mode 100755 index 00000000..95fcf169 --- /dev/null +++ b/scripts/init/openbsd/gogs @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $OpenBSD$ + +daemon="/home/git/gogs/gogs" +daemon_user="git" +daemon_flags="web" + +gogs_directory="/home/git/gogs" + +rc_bg=YES + +. /etc/rc.d/rc.subr + +rc_start() { + ${rcexec} "cd ${gogs_directory}; ${daemon} ${daemon_flags} ${_bg}" +} + +rc_cmd $1