Changeset 2066 for box/trunk/contrib


Ignore:
Timestamp:
29/01/2008 00:35:11 (4 years ago)
Author:
chris
Message:

Update contributed scripts to use autoconf substitution for the
paths to binaries, configuration files and local state files.

Location:
box/trunk/contrib
Files:
2 edited
6 moved

Legend:

Unmodified
Added
Removed
  • box/trunk/contrib/debian/bbackupd.in

    r1844 r2066  
    33# Start and stop the Box Backup client daemon. 
    44 
    5 test -x /usr/local/bin/bbackupd || exit 0 
    6 test -f /etc/box/bbackupd.conf || exit 0 
     5BBACKUPD=@bindir_expanded@/bbackupd 
     6CONFIG=@sysconfdir_expanded@/box/bbackupd.conf 
     7PIDFILE=@localstatedir_expanded@/bbackupd.pid 
     8 
     9test -x $BBACKUPD || exit 0 
     10test -f $CONFIG || exit 0 
    711 
    812case $1 in 
    913        start) 
    1014                echo -n "Starting Box Backup Client daemon: bbackupd" 
    11                 start-stop-daemon --start --quiet --exec /usr/local/bin/bbackupd > /dev/null 
     15                start-stop-daemon --start --quiet --exec $BBACKUPD > /dev/null 
    1216                echo "." 
    1317                ;; 
     
    1519        stop) 
    1620                echo -n "Stopping Box Backup Client daemon: bbackupd" 
    17                 start-stop-daemon --stop --quiet --pidfile /var/run/bbackupd.pid --exec /usr/local/bin/bbackupd 
     21                start-stop-daemon --stop --quiet \ 
     22                        --pidfile $PIDFILE --exec $BBACKUPD 
    1823                echo "." 
    1924                ;; 
    2025         
    2126        reload|force-reload) 
    22                 echo -n "Reloading the Box Backup Client daemon's configuration" 
    23                 start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile /var/run/bbackupd.pid --exec /usr/local/bin/bbackupd 
     27                echo -n "Reloading Box Backup Client configuration" 
     28                start-stop-daemon --stop --signal 1 --quiet --oknodo \ 
     29                        --pidfile $PIDFILE --exec $BBACKUPD 
    2430                echo "." 
    2531                ;; 
    2632                 
    2733        restart) 
    28                 echo -n "Restarting the Box Backup Client daemon: bbackupd"      
    29                 start-stop-daemon --stop --quiet --pidfile /var/run/bbackupd.pid --exec /usr/local/bin/bbackupd 
    30                 start-stop-daemon --start --quiet --exec /usr/local/bin/bbackupd > dev/null 
     34                echo -n "Restarting Box Backup Client daemon: bbackupd"  
     35                start-stop-daemon --stop --quiet --pidfile $PIDFILE \ 
     36                        --exec $BBACKUPD 
     37                start-stop-daemon --start --quiet \ 
     38                        --exec $BBACKUPD > /dev/null 
    3139                echo "." 
    3240                ;; 
  • box/trunk/contrib/debian/bbstored.in

    r1844 r2066  
    11#! /bin/sh 
    22 
    3 # Start and stop the Box Backup Server. 
     3# Start and stop the Box Backup server daemon. 
    44 
    5 test -x /usr/local/bin/bbstored || exit 0 
    6 test -f /etc/box/bbstored.conf || exit 0 
     5BBSTORED=@bindir_expanded@/bbstored 
     6CONFIG=@sysconfdir_expanded@/box/bbstored.conf 
     7PIDFILE=@localstatedir_expanded@/bbstored.pid 
     8 
     9test -x $BBACKUPD || exit 0 
     10test -f $CONFIG || exit 0 
    711 
    812case $1 in 
    913        start) 
    10                 echo -n "Starting the Box Backup Server daemon: bbstored" 
    11                 start-stop-daemon --start --quiet --exec /usr/local/bin/bbstored > /dev/null 
     14                echo -n "Starting Box Backup Server daemon: bbstored" 
     15                start-stop-daemon --start --quiet --exec $BBSTORED > /dev/null 
    1216                echo "." 
    1317                ;; 
    1418         
    1519        stop) 
    16                 echo -n "Stopping the Box Backup Server daemon: bbstored" 
    17                 start-stop-daemon --stop --quiet --pidfile /var/run/bbstored.pid --exec /usr/local/bin/bbstored 
     20                echo -n "Stopping Box Backup Server daemon: bbstored" 
     21                start-stop-daemon --stop --quiet \ 
     22                        --pidfile $PIDFILE --exec $BBSTORED 
    1823                echo "." 
    1924                ;; 
    2025         
    2126        reload|force-reload) 
    22                 echo -n "Reloading the Box Backup Server's configuration" 
    23                         start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile /var/run/bbstored.pid --exec /usr/local/bin/bbstored 
     27                echo -n "Reloading Box Backup Server configuration" 
     28                start-stop-daemon --stop --signal 1 --quiet --oknodo \ 
     29                        --pidfile $PIDFILE --exec $BBSTORED 
    2430                echo "." 
    2531                ;; 
    2632         
    2733        restart) 
    28                 echo -n "Restarting the Box Backup Server daemon: bbstored" 
    29                 start-stop-daemon --stop --quiet --pidfile /var/run/bbstored.pid --exec /usr/local/bin/bbstored 
    30                 start-stop-daemon --start --quiet --exec /usr/local/bin/bbstored > /dev/null 
     34                echo -n "Restarting Box Backup Server daemon: bbstored" 
     35                start-stop-daemon --stop --quiet --pidfile $PIDFILE \ 
     36                        --exec $BBSTORED 
     37                start-stop-daemon --start --quiet \ 
     38                        --exec $BBSTORED > /dev/null 
    3139                echo "." 
    3240                ;; 
    3341         
    3442        *) 
    35                 echo "Usage /etc/init.d/bbstored {start|stop|reload|force-reload|restart}" 
     43                echo "Usage: /etc/init.d/bbstored {start|stop|reload|force-reload|restart}" 
    3644esac 
    3745 
  • box/trunk/contrib/redhat/bbackupd.in

    r217 r2066  
    11#! /bin/bash 
    22# 
    3 # bbackupd          Start/Stop the box backup daemon. 
     3# bbackupd          Start/Stop the box backup client daemon. 
    44# 
    55# chkconfig: 345 93 07 
    6 # description: bbackup is the client side deamon for Box Backup, a completely \ 
    7 #              automatic on-line backup system 
     6# description: bbackupd is the client side deamon for Box Backup, \ 
     7#              a completely automatic on-line backup system. 
    88# processname: bbackupd 
    9 # config: /etc/box 
    10 # pidfile: /var/run/bbackupd.pid 
     9# config: @sysconfdir_expanded@/box 
     10# pidfile: @localstatedir_expanded@/bbackupd.pid 
    1111 
    1212# Source function library. 
     
    2020 
    2121# Check that configuration exists. 
    22 [ -f /etc/box/$prog.conf ] || exit 0 
     22[ -f @sysconfdir_expanded@/box/$prog.conf ] || exit 0 
    2323 
    2424start() { 
     
    5050 
    5151reload() { 
    52         echo -n $"Reloading $prog daemon configuration: " 
     52        echo -n $"Reloading $prog configuration: " 
    5353        killproc $prog -HUP 
    5454        retval=$? 
  • box/trunk/contrib/redhat/bbstored.in

    r217 r2066  
    11#! /bin/bash 
    22# 
    3 # bbstored          Start/Stop the box backup daemon. 
     3# bbstored          Start/Stop the box backup server daemon. 
    44# 
    55# chkconfig: 345 93 07 
    6 # description: bbstore is the server side deamon for Box Backup, a completely \ 
    7 #              automatic on-line backup system 
     6# description: bbstored is the server side daemon for Box Backup, \ 
     7#              a completely automatic on-line backup system. 
    88# processname: bbstored 
    9 # config: /etc/box 
    10 # pidfile: /var/run/bbstored.pid 
     9# config: @sysconfdir_expanded@/box 
     10# pidfile: @localstatedir_expanded@/bbstored.pid 
    1111 
    1212# Source function library. 
     
    2020 
    2121# Check that configuration exists. 
    22 [ -f /etc/box/$prog.conf ] || exit 0 
     22[ -f @sysconfdir_expanded@/box/$prog.conf ] || exit 0 
    2323 
    2424start() { 
     
    5050 
    5151reload() { 
    52         echo -n $"Reloading $prog daemon configuration: " 
     52        echo -n $"Reloading $prog configuration: " 
    5353        killproc $prog -HUP 
    5454        retval=$? 
  • box/trunk/contrib/solaris/bbackupd-smf-method.in

    r2035 r2066  
    11 
    2 PIDFILE=/var/run/bbackupd.pid 
     2PIDFILE=@localstatedir_expanded@/bbackupd.pid 
    33 
    44case $1 in  
  • box/trunk/contrib/solaris/bbstored-smf-method.in

    r2035 r2066  
    1 PIDFILE=/var/run/bbstored.pid 
     1PIDFILE=@localstatedir_expanded@/bbstored.pid 
    22 
    33case $1 in  
  • box/trunk/contrib/suse/bbackupd.in

    r217 r2066  
    88# SUITE OF PROGRAMS. LICENCE MAY BE VIEWED HERE: 
    99# 
    10 # http://www.fluffy.co.uk/boxbackup/license.html 
     10# http://www.boxbackup.org/license.html 
    1111###################################################################### 
    1212# 
     
    2929 
    3030# Check for missing binaries (stale symlinks should not happen) 
    31 BBACKUPD_BIN=/usr/sbin/bbackupd 
     31BBACKUPD_BIN=@bindir_expanded@/bbackupd 
    3232if [ ! -x $BBACKUPD_BIN ] ; then 
    3333        echo "$BBACKUPD_BIN not installed" 
     
    9191 
    9292    probe) 
    93                 test /etc/box/bbackupd.conf -nt /var/run/bbackupd.pid && echo reload 
     93                test @sysconfdir_expanded@/box/bbackupd.conf \ 
     94                        -nt @localstatedir_expanded@/bbackupd.pid \ 
     95                && echo reload 
    9496                ;; 
    9597 
  • box/trunk/contrib/suse/bbstored.in

    r217 r2066  
    88# SUITE OF PROGRAMS. LICENCE MAY BE VIEWED HERE: 
    99# 
    10 # http://www.fluffy.co.uk/boxbackup/license.html 
     10# http://www.boxbackup.org/license.html 
    1111###################################################################### 
    1212# 
    13 # /etc/init.d/bbackupd 
     13# /etc/init.d/bbstored 
    1414#   and its symbolic link 
    15 # /(usr/)sbin/rcbbackupd 
     15# /(usr/)sbin/rcbbstored 
    1616# 
    1717### BEGIN INIT INFO 
    18 # Provides:          bbackupd 
     18# Provides:          bbstored 
    1919# Required-Start:    $named $network $local_fs $syslog 
    2020# X-UnitedLinux-Should-Start: $time ypbind sendmail 
     
    2424# Default-Stop:      0 1 2 6 
    2525# Short-Description: BoxBackup server side daemon 
    26 # Description: Client daemon for the BoxBackup software        
    27 #       that allows you to communicate with a bbstored server. 
     26# Description: Server daemon for the BoxBackup software, 
     27#       to which bbackupd clients connect. 
    2828### END INIT INFO 
    2929#  
    3030 
    3131# Check for missing binaries (stale symlinks should not happen) 
    32 BBACKUPD_BIN=/usr/sbin/bbstored 
    33 if [ ! -x $BBACKUPD_BIN ] ; then 
    34         echo "$BBACKUPD_BIN not installed" 
     32BBSTORED_BIN=@bindir_expanded@/bbstored 
     33if [ ! -x $BBSTORED_BIN ] ; then 
     34        echo "$BBSTORED_BIN not installed" 
    3535        exit 5 
    3636fi 
     
    4444        start) 
    4545        echo -n "Starting bbstored " 
    46         startproc $BBACKUPD_BIN 
     46        startproc $BBSTORED_BIN 
    4747        rc_status -v 
    4848        ;; 
    4949 
    5050    stop) 
    51         echo -n "Shutting down bstored " 
    52         killproc -TERM $BBACKUPD_BIN 
     51        echo -n "Shutting down bbstored " 
     52        killproc -TERM $BBSTORED_BIN 
    5353        rc_status -v 
    5454        ;; 
     
    7575    force-reload) 
    7676        echo -n "Reload service bbstored " 
    77         killproc -HUP $BBACKUPD_BIN 
     77        killproc -HUP $BBSTORED_BIN 
    7878        rc_status -v 
    7979        ;; 
     
    8181    reload) 
    8282        echo -n "Reload service bbstored  " 
    83         killproc -HUP $BBACKUPD_BIN 
     83        killproc -HUP $BBSTORED_BIN 
    8484        rc_status -v 
    8585        ;; 
     
    8787    status) 
    8888        echo -n "Checking for service bbstored " 
    89         checkproc $BBACKUPD_BIN 
     89        checkproc $BBSTORED_BIN 
    9090        rc_status -v 
    9191        ;; 
    9292 
    9393    probe) 
    94         test /etc/box/bbstored.conf -nt /var/run/bbstored.pid && echo reload 
     94        test @sysconfdir_expanded@/box/bbstored.conf \ 
     95                -nt @localstatedir_expanded@/bbstored.pid && echo reload 
    9596        ;; 
    9697 
Note: See TracChangeset for help on using the changeset viewer.