blob: 7ac8b1af0722374354cdb4ca7b9fc79ffd54ce3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: ipa.generic,v 1.1 2003/05/30 11:53:17 salo Exp $
#
name="ipa"
required_files="@PKG_SYSCONFDIR@/${name}.conf"
required_dirs="/var/ipa"
pidfile="/var/run/${name}.pid"
command="@PREFIX@/bin/ipa"
ipa_start()
{
if [ ! -r $required_files ]; then
echo "$0: WARNING: $required_files is not readable."
exit 1
fi
if [ ! -d $required_dirs ]; then
echo "$0: WARNING: $required_dirs is not a directory."
exit 1
fi
echo "Starting ${name}."
eval $command
return_code=$?
if [ $return_code != "0" ]; then
exit 1
fi
}
ipa_stop()
{
echo "Stopping ${name}."
${command} -k shutdown
}
ipa_reconfigure()
{
echo "Reloading ${name} configuration."
${command} -k reconfigure
}
ipa_dump()
{
echo "Dumping ${name} stats."
${command} -k dump
}
case $1 in
'start')
ipa_start
;;
'stop')
ipa_stop
;;
'restart')
ipa_stop
ipa_start
;;
'reconfigure')
ipa_reconfigure
;;
'dump')
ipa_dump
;;
*)
echo "Usage: $0 (start|stop|restart|reconfigure|dump)"
;;
esac
|