20fd132b8d
* REQUIRE: isdnd, so this will be shutdown before that, to prevent future problem if isdnd eve gets an explicit "shutdown" keyword. Per discussion with Martin Husemann.
38 lines
640 B
Bash
Executable File
38 lines
640 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: ipfs,v 1.6 2004/07/05 08:21:15 lukem Exp $
|
|
#
|
|
|
|
# PROVIDE: ipfs
|
|
# REQUIRE: ipnat mountcritremote downinterfaces isdnd
|
|
# BEFORE: SERVERS
|
|
# KEYWORD: shutdown
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="ipfs"
|
|
rcvar=$name
|
|
start_cmd="ipfs_start"
|
|
stop_cmd="ipfs_stop"
|
|
|
|
ipfs_start()
|
|
{
|
|
if [ -r /var/db/ipf/ipstate.ipf -a -r /var/db/ipf/ipnat.ipf ]; then
|
|
/usr/sbin/ipfs -R ${rc_flags}
|
|
rm -f /var/db/ipf/ipstate.ipf /var/db/ipf/ipnat.ipf
|
|
fi
|
|
}
|
|
|
|
ipfs_stop()
|
|
{
|
|
if [ ! -d /var/db/ipf ]; then
|
|
mkdir /var/db/ipf
|
|
chmod 700 /var/db/ipf
|
|
chown root:wheel /var/db/ipf
|
|
fi
|
|
/usr/sbin/ipfs -W ${rc_flags}
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|