Blame
Date:
Fri Jan 1 19:03:58 2021 UTC
Message:
Update Platforms.txt - Add aarch64/apple/darwin (Apple CLang 12.0.0) - Add x86_64/unknown/openbsd6.7 (gcc 4.2.1) Thanks to Götz Hoffart
01
2009-05-05
alex
#!/bin/sh
02
2009-05-05
alex
03
2009-05-05
alex
# PROVIDE: ngircd
04
2009-05-05
alex
# REQUIRE: NETWORKING SERVERS
05
2009-05-05
alex
# BEFORE: DAEMON
06
2009-05-05
alex
# KEYWORD: FreeBSD shutdown
07
2009-05-05
alex
08
2009-05-05
alex
# Add the following line to /etc/rc.conf to enable `ngircd':
09
2009-05-05
alex
#
10
2009-05-05
alex
#ngircd_enable="YES"
11
2009-05-05
alex
#
12
2009-05-05
alex
13
2009-05-05
alex
. "/etc/rc.subr"
14
2009-05-05
alex
15
2009-05-05
alex
name="ngircd"
16
2009-05-05
alex
rcvar=`set_rcvar`
17
2009-05-05
alex
18
2009-05-05
alex
command="/usr/local/sbin/ngircd"
19
2009-05-05
alex
command_args=""
20
2009-05-05
alex
21
2009-05-05
alex
load_rc_config "$name"
22
2009-05-05
alex
: ${ngircd_enable="NO"}
23
2009-05-05
alex
: ${ngircd_flags=""}
24
2009-05-05
alex
25
2009-05-05
alex
required_files="/usr/local/etc/$name.conf"
26
2009-05-05
alex
pidfile="${ngircd_pidfile:-/var/run/${name}/${name}.pid}"
27
2009-05-05
alex
28
2009-05-05
alex
if [ ! x"${ngircd_chrootdir}" = x ];then
29
2009-05-05
alex
# Mount a devfs in the chroot directory if needed
30
2009-05-05
alex
if [ ! -c ${ngircd_chrootdir}/dev/random \
31
2009-05-05
alex
-o ! -c ${ngircd_chrootdir}/dev/null ]; then
32
2009-05-05
alex
umount ${ngircd_chrootdir}/dev 2>/dev/null
33
2009-05-05
alex
mount_devfs devfs ${ngircd_chrootdir}/dev
34
2009-05-05
alex
fi
35
2009-05-05
alex
36
2009-05-05
alex
devfs -m ${ngircd_chrootdir}/dev rule apply hide
37
2009-05-05
alex
devfs -m ${ngircd_chrootdir}/dev rule apply path null unhide
38
2009-05-05
alex
devfs -m ${ngircd_chrootdir}/dev rule apply path random unhide
39
2009-05-05
alex
40
2009-05-05
alex
# Copy local timezone information if it is not up to date.
41
2009-05-05
alex
if [ -f /etc/localtime ]; then
42
2009-05-05
alex
cmp -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
43
2009-05-05
alex
cp -p /etc/localtime "${named_chrootdir}/etc/localtime"
44
2009-05-05
alex
fi
45
2009-05-05
alex
46
2009-05-05
alex
pidfile="${ngircd_chrootdir}${pidfile}"
47
2009-05-05
alex
fi
48
2009-05-05
alex
49
2009-05-05
alex
run_rc_command "$1"
50
2009-05-05
alex
51
2009-05-05
alex
# -eof-
IRCNow