4 # Provides: pgbouncer_follower_rw
5 # Required-Start: $network $local_fs $remote_fs $syslog
6 # Required-Stop: $network $local_fs $remote_fs $syslog
7 # Default-Start: 2 3 4 5
9 # Short-Description: Start pgbouncer_follower_rw daemon at boot time
10 # Description: Enable pgbouncer_follower_rw service.
13 NAME=pgbouncer_follower_rw
15 DAEMON=/var/slony/pgbouncer_follower/pgbouncer_follower.pl
16 CFGFILE=/var/slony/pgbouncer_follower/$NAME.conf
17 DAEMON_OPTS="-f $CFGFILE -D"
18 PIDFILE=/var/run/$NAME.pid
19 # note: SSD is required only at startup of the daemon.
20 SSD=`which start-stop-daemon`
21 ENV="env -i LANG=C PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/pgsql/bin"
27 echo -n "Starting server: $NAME"
28 su $USER -c "$ENV $SSD --start --pidfile $PIDFILE --background --quiet --exec $DAEMON -- $DAEMON_OPTS"
32 echo -n "Stopping server: $NAME"
33 su $USER -c "$SSD --stop --pidfile $PIDFILE"
42 echo "Usage: /etc/init.d/$NAME {start|stop|restart}"