Added init scripts for NetBSD
This commit is contained in:
parent
7d1f325e24
commit
4516a1848e
4
Makefile
4
Makefile
|
@ -31,6 +31,10 @@ dist:
|
|||
$(PACKAGE)-$(VERSION)/src/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/tools/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/tools/create.sh \
|
||||
$(PACKAGE)-$(VERSION)/tools/netbsd/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/tools/netbsd/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/tools/netbsd/DaMon \
|
||||
$(PACKAGE)-$(VERSION)/tools/netbsd/Probe \
|
||||
$(PACKAGE)-$(VERSION)/tools/project.conf \
|
||||
$(PACKAGE)-$(VERSION)/Makefile \
|
||||
$(PACKAGE)-$(VERSION)/COPYING \
|
||||
|
|
23
tools/netbsd/DaMon
Executable file
23
tools/netbsd/DaMon
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD$
|
||||
#
|
||||
# PROVIDE: DaMon
|
||||
# REQUIRE: Probe
|
||||
# KEYWORD: shutdown
|
||||
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
. /etc/rc.subr
|
||||
fi
|
||||
|
||||
name="DaMon"
|
||||
rcvar=$name
|
||||
command="/usr/local/bin/DaMon"
|
||||
command_args="&"
|
||||
required_files="/usr/local/etc/$name.conf"
|
||||
DaMon_chdir="/home/damon"
|
||||
DaMon_user="damon"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
24
tools/netbsd/Makefile
Normal file
24
tools/netbsd/Makefile
Normal file
|
@ -0,0 +1,24 @@
|
|||
PREFIX = /usr/local
|
||||
DESTDIR =
|
||||
MKDIR = mkdir -p
|
||||
INSTALL = install
|
||||
RM = rm -f
|
||||
|
||||
|
||||
all:
|
||||
|
||||
clean:
|
||||
|
||||
distclean: clean
|
||||
|
||||
install: all
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/examples/rc.d
|
||||
$(INSTALL) -m 0555 DaMon $(DESTDIR)$(PREFIX)/share/examples/rc.d/DaMon
|
||||
$(MKDIR) $(DESTDIR)$(PREFIX)/share/examples/rc.d
|
||||
$(INSTALL) -m 0555 Probe $(DESTDIR)$(PREFIX)/share/examples/rc.d/Probe
|
||||
|
||||
uninstall:
|
||||
$(RM) $(DESTDIR)$(PREFIX)/share/examples/rc.d/DaMon
|
||||
$(RM) $(DESTDIR)$(PREFIX)/share/examples/rc.d/Probe
|
||||
|
||||
.PHONY: all clean distclean install uninstall
|
21
tools/netbsd/Probe
Executable file
21
tools/netbsd/Probe
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD$
|
||||
#
|
||||
# PROVIDE: Probe
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
if [ -f /etc/rc.subr ]
|
||||
then
|
||||
. /etc/rc.subr
|
||||
fi
|
||||
|
||||
name="Probe"
|
||||
rcvar=$name
|
||||
command="/usr/local/bin/Probe"
|
||||
command_args="&"
|
||||
Probe_user="probe"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
9
tools/netbsd/project.conf
Normal file
9
tools/netbsd/project.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
dist=DaMon,Probe
|
||||
|
||||
[DaMon]
|
||||
install=$(PREFIX)/share/examples/rc.d
|
||||
mode=0555
|
||||
|
||||
[Probe]
|
||||
install=$(PREFIX)/share/examples/rc.d
|
||||
mode=0555
|
|
@ -1 +1 @@
|
|||
dist=Makefile,create.sh
|
||||
dist=Makefile,create.sh,netbsd/project.conf,netbsd/Makefile,netbsd/DaMon,netbsd/Probe
|
||||
|
|
Loading…
Reference in New Issue
Block a user