Changeset 269 for trunk/packages/sipb-xen-dns
- Timestamp:
- Feb 24, 2008, 10:34:49 PM (17 years ago)
- Location:
- trunk/packages/sipb-xen-dns
- Files:
-
- 1 added
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-dns/debian/control
r268 r269 8 8 Package: sipb-xen-dns 9 9 Architecture: all 10 Depends: ${misc:Depends}, 11 Description: Base configuration required for all SIPB xen servers 12 This package includes apt configuration, .k5login and other files that 13 should be synchronized among all our servers. 14 Installing this on a non-sipb-xen machine would be very anti-social. 10 Depends: ${misc:Depends}, daemon 11 Description: Install and enable the DNS server -
trunk/packages/sipb-xen-dns/debian/rules
r268 r269 4 4 5 5 binary-fixup/sipb-xen-dns:: 6 svn co file:///mit/sipb-xen/svn/trunk/ dns/ $(DEB_DESTDIR)/usr/local/lib/sipb-xen-dns6 svn co file:///mit/sipb-xen/svn/trunk/packages/sipb-xen-dns/code/ $(DEB_DESTDIR)/usr/local/lib/sipb-xen-dns -
trunk/packages/sipb-xen-dns/debian/sipb-xen-dns.init
r268 r269 19 19 # PATH should only include /usr/* if it runs after the mountnfs.sh script 20 20 PATH=/sbin:/usr/sbin:/bin:/usr/bin 21 DESC=" Description of the service"22 NAME= daemonexecutablename23 DAEMON=/usr/ sbin/$NAME24 DAEMON_ARGS=" --options args"21 DESC="The sipb-xen DNS server" 22 NAME=sipb-xen-dns 23 DAEMON=/usr/local/lib/sipb-xen-dns/dnsserver.py 24 DAEMON_ARGS="" 25 25 PIDFILE=/var/run/$NAME.pid 26 26 SCRIPTNAME=/etc/init.d/$NAME … … 48 48 # 1 if daemon was already running 49 49 # 2 if daemon could not be started 50 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ 51 || return 1 52 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ 53 $DAEMON_ARGS \ 54 || return 2 55 # Add code here, if necessary, that waits for the process to be ready 56 # to handle requests from services started subsequently which depend 57 # on this one. As a last resort, sleep for some time. 50 daemon --running -n $NAME && return 1 51 daemon -r -n $NAME -U $DAEMON $DAEMON_ARGS || return 2 58 52 } 59 53 … … 68 62 # 2 if daemon could not be stopped 69 63 # other if a failure occurred 70 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name$NAME64 daemon --stop -n $NAME 71 65 RETVAL="$?" 72 66 [ "$RETVAL" = 2 ] && return 2 73 # Wait for children to finish too if this is a daemon that forks74 # and if the daemon is only ever run from this initscript.75 # If the above conditions are not satisfied then add some other code76 # that waits for the process to drop all resources that could be77 # needed by services started subsequently. A last resort is to78 # sleep for some time.79 start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON80 [ "$?" = 2 ] && return 281 67 # Many daemons don't delete their pidfiles when they exit. 82 68 rm -f $PIDFILE 83 69 return "$RETVAL" 84 }85 86 #87 # Function that sends a SIGHUP to the daemon/service88 #89 do_reload() {90 #91 # If the daemon can reload its configuration without92 # restarting (for example, when it is sent a SIGHUP),93 # then implement that here.94 #95 start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME96 return 097 70 } 98 71
Note: See TracChangeset
for help on using the changeset viewer.