wok-6.x rev 10992
Up: at to 3.1.13.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Oct 13 02:28:37 2011 +0000 (2011-10-13) |
parents | 8cbc91d13a1b |
children | a5838fe60f54 |
files | at/receipt at/stuff/atd |
line diff
1.1 --- a/at/receipt Thu Oct 13 02:13:42 2011 +0000 1.2 +++ b/at/receipt Thu Oct 13 02:28:37 2011 +0000 1.3 @@ -1,11 +1,11 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="at" 1.7 -VERSION="3.1.12" 1.8 +VERSION="3.1.13" 1.9 CATEGORY="system-tools" 1.10 SHORT_DESC="Schedule commands to be executed once." 1.11 MAINTAINER="pascal.bellard@slitaz.org" 1.12 -BUILD_DEPENDS="bison flex" 1.13 +BUILD_DEPENDS="bison flex ssmtp" 1.14 TARBALL="${PACKAGE}_${VERSION}.orig.tar.gz" 1.15 WEB_SITE="http://packages.debian.org/lenny/at" 1.16 WGET_URL="http://ftp.debian.org/debian/pool/main/${PACKAGE:0:1}/$PACKAGE/$TARBALL" 1.17 @@ -20,16 +20,17 @@ 1.18 --with-atspool=/var/spool/atd \ 1.19 --with-jobdir=/var/spool/atd \ 1.20 $CONFIGURE_ARGS && 1.21 - make && 1.22 - make IROOT=$DESTDIR install 1.23 + make -j1 && 1.24 + make -j1 IROOT=$DESTDIR install 1.25 } 1.26 1.27 # Rules to gen a SliTaz package suitable for Tazpkg. 1.28 genpkg_rules() 1.29 { 1.30 - mkdir -p $fs/usr 1.31 + mkdir -p $fs/usr $fs/etc/init.d 1.32 cp -a $_pkg/usr/bin $fs/usr 1.33 cp -a $_pkg/usr/sbin $fs/usr 1.34 cp -a $_pkg/etc $fs 1.35 cp -a $_pkg/var $fs 1.36 + cp -a $stuff/atd $fs/etc/init.d 1.37 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/at/stuff/atd Thu Oct 13 02:28:37 2011 +0000 2.3 @@ -0,0 +1,58 @@ 2.4 +#!/bin/sh 2.5 +# Start, stop and restart a atd deamon on SliTaz, at boot time or 2.6 +# with the command line. 2.7 +# 2.8 +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS 2.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. 2.10 +# 2.11 +. /etc/init.d/rc.functions 2.12 + 2.13 +NAME=$(basename $0) 2.14 +DESC="$NAME deamon" 2.15 +DAEMON=$(which $NAME) 2.16 +eval $(grep -i ^${NAME}_OPTIONS /etc/daemons.conf | sed 's/.*_OPT/OPT/') 2.17 +PIDFILE=/var/run/$NAME.pid 2.18 + 2.19 +case "$1" in 2.20 + start) 2.21 + if active_pidfile $PIDFILE $NAME ; then 2.22 + echo "$NAME is already running." 2.23 + exit 1 2.24 + fi 2.25 + echo -n "Starting $DESC: $NAME... " 2.26 + $DAEMON $OPTIONS 2.27 + [ -f $PIDFILE ] || pidof $NAME | awk '{ print $1 }' > $PIDFILE 2.28 + active_pidfile $PIDFILE $NAME 2.29 + status 2.30 + ;; 2.31 + stop) 2.32 + if ! active_pidfile $PIDFILE $NAME ; then 2.33 + echo "$NAME is not running." 2.34 + exit 1 2.35 + fi 2.36 + echo -n "Stopping $DESC: $NAME... " 2.37 + kill `cat $PIDFILE` 2.38 + status 2.39 + ;; 2.40 + restart) 2.41 + if ! active_pidfile $PIDFILE $NAME ; then 2.42 + echo "$NAME is not running." 2.43 + exit 1 2.44 + fi 2.45 + echo -n "Restarting $DESC: $NAME... " 2.46 + kill `cat $PIDFILE` 2.47 + sleep 2 2.48 + $DAEMON $OPTIONS 2.49 + [ -f $PIDFILE ] || pidof $NAME | awk '{ print $1 }' > $PIDFILE 2.50 + active_pidfile $PIDFILE $NAME 2.51 + status 2.52 + ;; 2.53 +*) 2.54 + echo "" 2.55 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 2.56 + echo "" 2.57 + exit 1 2.58 + ;; 2.59 +esac 2.60 + 2.61 +exit 0