repo.or.cz
/
aur-mirror.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
updated on Thu Jan 12 16:09:17 UTC 2012
[aur-mirror.git]
/
capt-src
/
ccpd
blob
ead072297adfb1317cb98d444a28efc69784dbe5
1
#!/bin/bash
2
3
.
/
etc
/
rc.conf
4
.
/
etc
/
rc.d
/
functions
5
6
DAEMON
=/
usr
/
sbin
/
ccpd
7
PID
=
$
(
pidof
-o
%
PPID
${DAEMON}
)
8
9
start
()
10
{
11
stat_busy
"Starting CCPD"
12
[
-z
"
${PID}
"
] &&
${DAEMON}
2
>/
dev
/
null
13
if
[
$?
-gt
0
];
then
14
stat_fail
15
else
16
add_daemon ccpd
17
stat_done
18
fi
19
}
20
21
stop
()
22
{
23
stat_busy
"Stopping CCPD"
24
[ !
-z
"
${PID}
"
] &&
kill
${PID}
&> /
dev
/
null
25
if
[
$?
-gt
0
];
then
26
stat_fail
27
else
28
rm_daemon ccpd
29
stat_done
30
fi
31
}
32
33
case
"
$1
"
in
34
start
)
35
start
36
;;
37
stop
)
38
stop
39
;;
40
restart
)
41
$0
stop
42
sleep
1
43
$0
start
44
;;
45
*)
46
echo
"usage:
$0
{start|stop|restart}"
47
esac
48
exit
0