wok-next rev 4192
Add: fcron
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Wed Sep 23 14:06:30 2009 +0000 (2009-09-23) |
parents | 94df704e5b86 |
children | 377c0ffa78b5 |
files | fcron/receipt fcron/stuff/fcron |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/fcron/receipt Wed Sep 23 14:06:30 2009 +0000 1.3 @@ -0,0 +1,45 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="fcron" 1.7 +VERSION="3.0.4" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Periodical command scheduler" 1.10 +MAINTAINER="erjo@slitaz.org" 1.11 +DEPENDS="" 1.12 +TARBALL="$PACKAGE-$VERSION.src.tar.gz" 1.13 +WEB_SITE="http://fcron.free.fr/" 1.14 +WGET_URL="http://fcron.free.fr/archives/$TARBALL" 1.15 + 1.16 +# Rules to configure and make the package. 1.17 +compile_rules() 1.18 +{ 1.19 + cd $src 1.20 + ./configure \ 1.21 + --prefix=/usr \ 1.22 + --sysconfdir=/etc \ 1.23 + --localstatedir=/var \ 1.24 + --without-sendmail \ 1.25 + --with-username=nobody \ 1.26 + --with-groupname=nogroup \ 1.27 + --with-pam=no \ 1.28 + --with-selinux=no \ 1.29 + --with-answer-all=no \ 1.30 + --with-boot-install=no \ 1.31 + --with-editor=/bin/vi \ 1.32 + --with-sysfcrontab=yes \ 1.33 + $CONFIGURE_ARGS && 1.34 + make && make DESTDIR=$PWD/_pkg install 1.35 +} 1.36 + 1.37 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.38 +genpkg_rules() 1.39 +{ 1.40 + mkdir -p $fs/usr/ 1.41 + cp -a $_pkg/usr/bin $fs/usr 1.42 + cp -a $_pkg/var $fs/ 1.43 + cp -a $_pkg/etc $fs/ 1.44 + cp -a $src/fcron $fs/usr/bin 1.45 + 1.46 + cp -a stuff/fcron $fs/etc/init.d 1.47 +} 1.48 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/fcron/stuff/fcron Wed Sep 23 14:06:30 2009 +0000 2.3 @@ -0,0 +1,55 @@ 2.4 +#!/bin/sh 2.5 +# /etc/init.d/fcron : Start, stop and fcron on SliTaz, at 2.6 +# boot time or with the command line. 2.7 +# 2.8 +# To start SSH server at boot time, just put fcron 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 +. /etc/daemons.conf 2.13 + 2.14 +NAME=fcron 2.15 +DESC="Cron daemon" 2.16 +DAEMON=/usr/bin/fcron 2.17 +OPTIONS=-b 2.18 +PIDFILE=/var/run/fcron.pid 2.19 + 2.20 +case "$1" in 2.21 + start) 2.22 + if active_pidfile $PIDFILE fcron ; then 2.23 + echo "$NAME already running." 2.24 + exit 1 2.25 + fi 2.26 + echo -n "Starting $DESC: $NAME... " 2.27 + $DAEMON $OPTIONS 2.28 + status 2.29 + ;; 2.30 + stop) 2.31 + if ! active_pidfile $PIDFILE fcron ; then 2.32 + echo "$NAME is not running." 2.33 + exit 1 2.34 + fi 2.35 + echo -n "Stopping $DESC: $NAME... " 2.36 + kill `cat $PIDFILE` 2.37 + status 2.38 + ;; 2.39 + restart) 2.40 + if ! active_pidfile $PIDFILE fcron ; then 2.41 + echo "$NAME is not running." 2.42 + exit 1 2.43 + fi 2.44 + echo -n "Restarting $DESC: $NAME... " 2.45 + kill `cat $PIDFILE` 2.46 + sleep 2 2.47 + $DAEMON $OPTIONS 2.48 + status 2.49 + ;; 2.50 + *) 2.51 + echo "" 2.52 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 2.53 + echo "" 2.54 + exit 1 2.55 + ;; 2.56 +esac 2.57 + 2.58 +exit 0