File: daemon

package info (click to toggle)
spamassassin 4.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,988 kB
  • sloc: perl: 88,863; ansic: 5,193; sh: 3,737; javascript: 339; sql: 295; makefile: 209; python: 49
file content (19 lines) | stat: -rw-r--r-- 325 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#----------------------------
# Testing spamassassin daemon
#----------------------------
set -e

/etc/init.d/spamd restart >/dev/null 2>&1

# give spamd some time to initialize
sleep 2

if pgrep spamd > /dev/null; then
    echo "OK"
    exit 0
else
    ps ax
    echo "ERROR: SPAMD IS NOT RUNNING"
    exit 1
fi