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 Fri Jan 20 16:18:17 UTC 2012
[aur-mirror.git]
/
hgd
/
hgd-netd
blob
c83fe114f56983af21a4590d67c3f5979c0bba7c
1
#!/bin/bash
2
3
.
/
etc
/
rc.conf
4
.
/
etc
/
rc.d
/
functions
5
6
DAEMON
=
hgd-netd
7
8
PID
=
$
(
get_pid
$DAEMON
)
9
10
case
"
$1
"
in
11
start
)
12
stat_busy
"Starting
$DAEMON
"
13
[
-z
"
$PID
"
] &&
`which
$DAEMON
`
&>/
dev
/
null
14
if
[
$?
=
0
];
then
15
add_daemon
$DAEMON
16
stat_done
17
else
18
stat_fail
19
exit
1
20
fi
21
;;
22
stop
)
23
stat_busy
"Stopping
$DAEMON
"
24
[
-n
"
$PID
"
] &&
kill
$PID
&>/
dev
/
null
25
if
[
$?
=
0
];
then
26
rm_daemon
$DAEMON
27
stat_done
28
else
29
stat_fail
30
exit
1
31
fi
32
;;
33
restart
)
34
$0
stop
35
sleep
1
36
$0
start
37
;;
38
*)
39
echo
"usage:
$0
{start|stop|restart}"
40
esac
41
42
# vim:set ts=2 sw=2 et: