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 Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git]
/
spampd
/
rc-script
blob
7c4b0591b16192f191d04ddaa6f680ebdd7ed7dd
1
#!/bin/bash
2
3
.
/
etc
/
rc.conf
4
.
/
etc
/
rc.d
/
functions
5
.
/
etc
/
conf.d
/
spampd
6
7
start
() {
8
stat_busy
"Starting Spampd"
9
su
-l
spampd
-c
"/usr/bin/spampd
$ARGS
"
10
if
[
$?
-gt
0
];
then
11
stat_fail
12
else
13
add_daemon spampd
14
stat_done
15
fi
16
}
17
18
stop
() {
19
stat_busy
"Stopping Spampd"
20
kill
$
(
cat
/
home
/
spampd
/
spampd.pid
)
21
if
[
$?
-gt
0
];
then
22
stat_fail
23
else
24
rm_daemon spampd
25
stat_done
26
fi
27
}
28
29
case
"
$1
"
in
30
start
)
31
start
32
;;
33
stop
)
34
stop
35
;;
36
restart
)
37
# calling 'stop' and 'start' without the $0 fails...
38
$0
stop
39
$0
start
40
;;
41
*)
42
echo
"usage:
$0
{start|stop|restart}"
43
esac
44
exit
0