add an example rc(8) script for openbsd

copy it to `/etc/rc.d`, write your config in `/etc/gmid.conf` and launch
using `rcctl enable gmid && rcctl start gmid`.
This commit is contained in:
la-ninpre 2021-07-13 11:43:18 +03:00 committed by Omar Polo
parent dbbfd0fb9f
commit caf4e5fb22
3 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
*.pem
TAGS
gmid
!contrib/gmid
gg
*.o
compat/*.o

View File

@ -14,3 +14,6 @@ vim
Syntax highlighting of gmid configuration for vim, to be
placed into ~/.vim/ or /usr/share/vim/vimfiles.
gmid
Sample rc(8) script for gmid for OpenBSD.

14
contrib/gmid Normal file
View File

@ -0,0 +1,14 @@
#!/bin/ksh
#
daemon="/usr/local/bin/gmid"
daemon_flags="-c /etc/gmid.conf"
. /etc/rc.d/rc.subr
rc_pre() {
# use rcexec here since daemon_flags may contain arguments with spaces
${rcexec} "${daemon} -n ${daemon_flags}"
}
rc_cmd $1