aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/oscar/info.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2015-08-03 22:54:58 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2015-08-03 22:54:58 +0100
commitd567b58a869e9e7c6a39332da50c2b2be067d23f (patch)
tree7feec4b23187fcc2787fc4d846236c8b46ae2f15 /protocols/oscar/info.c
parent2f99f232386d32d6c6c3d85484ac35b771911997 (diff)
3.4.1-1 Debian package.
Diffstat (limited to 'protocols/oscar/info.c')
0 files changed, 0 insertions, 0 deletions
0.20.0.1 Unnamed repository; edit this file 'description' to name the repository.MimesBrønn
aboutsummaryrefslogtreecommitdiffstats
path: root/config/alert-tracks-debian.ugly
blob: 5bd146061dfd0161fa31ba1f97f1232b736b4278 (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
79
80
81
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: alert-tracks
# Required-Start: $local_fs $syslog
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5 
# Default-Stop: 0 1 6
# Short-Description: alert-tracks is a daemon running the Alaveteli email alerts
# Description: alert-tracks send Alaveteli email alerts as required
### END INIT INFO
#
# !!(*= $daemon_name *)!! Start the Alaveteli email alert daemon

NAME=!!(*= $daemon_name *)!!
DAEMON=/data/vhost/!!(*= $vhost *)!!/alaveteli/script/runner
DAEMON_ARGS="--daemon TrackMailer.alert_tracks_loop"
PIDFILE=/data/vhost/!!(*= $vhost *)!!/alert-tracks.pid
LOGFILE=/data/vhost/!!(*= $vhost *)!!/logs/alert-tracks.log
DUSER=!!(*= $user *)!!

trap "" 1

export PIDFILE LOGFILE

quietly_start_daemon() {
    /sbin/start-stop-daemon --quiet --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS
}

start_daemon() {
    /sbin/start-stop-daemon --start --pidfile "$PIDFILE" --chuid "$DUSER" --startas "$DAEMON" -- $DAEMON_ARGS
}

stop_daemon() {
    /sbin/start-stop-daemon --stop --oknodo --pidfile "$PIDFILE"
}

restart() { stop; start; }

case "$1" in
  check)
      quietly_start_daemon
      if [ $? -ne 1 ]
      then
          echo "Alaveteli alert daemon was not running; now restarted"
          exit 1
      else
          exit 0
      fi
      ;;
  
  start)
      echo -n "Starting Alaveteli alert daemon: $NAME"
      start_daemon
      ;;
  
  stop)
        echo -n "Stopping Alaveteli alert daemon: $NAME"
        stop_daemon
        ;;
  
  restart)
      echo -n "Restarting Alaveteli alert daemon: $NAME"
      stop_daemon
      start_daemon
      ;;

  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart|check}"
    exit 1
    ;;
esac

if [ $? -eq 0 ]; then
    echo .
    exit 0
else
    echo " failed"
    exit 1
fi