Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92980232a6 | ||
|
|
b9d20d9c88 | ||
|
|
1dc127757c | ||
|
|
3c259f0bf1 |
17
Makefile
17
Makefile
@@ -9,20 +9,20 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
ARCH = x86_64
|
ARCH = x86_64
|
||||||
DEPENDS = dash,glibc
|
DEPENDS = dash,glibc,initscripts
|
||||||
BUILDDEPS =
|
BUILDDEPS =
|
||||||
URL = http://ftp.isc.org/isc/cron/
|
URL = http://ftp.isc.org/isc/cron/
|
||||||
REPO = main
|
REPO = main
|
||||||
BRIEF = daemon to execute scheduled commands
|
BRIEF = daemon to execute scheduled commands
|
||||||
DESC = An implimentation of cron based on the SysV cron (aka Vixie cron)
|
DESC = An implimentation of cron based on the SysV cron (aka Vixie cron)
|
||||||
SNAPVER = 1
|
SLVER = 5
|
||||||
|
|
||||||
ARCHIVE := $(PWD)/$(shell ls SRC/*.shar|tail -1)
|
ARCHIVE := $(PWD)/$(shell ls SRC/*.shar|tail -1)
|
||||||
SRCDIR := cron-$(shell echo $(ARCHIVE)|egrep -o '[0-9]\.[0-9]')
|
SRCDIR := cron-$(shell echo $(ARCHIVE)|egrep -o '[0-9]\.[0-9]')
|
||||||
PATCHDIR := $(PWD)/SRC/patches
|
PATCHDIR := $(PWD)/SRC/patches
|
||||||
VERSION := $(shell echo $(SRCDIR)|egrep -o '[0-9].*'|sed 's/^-//')-$(SNAPVER)
|
VERSION := $(shell echo $(SRCDIR)|egrep -o '[0-9].*'|sed 's/^-//')-$(SLVER)
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/sl/Makefile.snaplinux
|
||||||
|
|
||||||
$(SRCDIR)/Makefile: $(ARCHIVE)
|
$(SRCDIR)/Makefile: $(ARCHIVE)
|
||||||
@install -v -d $(SRCDIR) ./ && \
|
@install -v -d $(SRCDIR) ./ && \
|
||||||
@@ -63,10 +63,8 @@ $(ROOT): $(SRCDIR)/cron
|
|||||||
install -v -m 644 crontab.1 $(ROOT)/usr/share/man/man1/crontab.1 && \
|
install -v -m 644 crontab.1 $(ROOT)/usr/share/man/man1/crontab.1 && \
|
||||||
install -v -m 644 crontab.5 $(ROOT)/usr/share/man/man5/crontab.5 && \
|
install -v -m 644 crontab.5 $(ROOT)/usr/share/man/man5/crontab.5 && \
|
||||||
install -v -m 644 cron.8 $(ROOT)/usr/share/man/man8/cron.8 && \
|
install -v -m 644 cron.8 $(ROOT)/usr/share/man/man8/cron.8 && \
|
||||||
install -v -m 755 $(SNAPDIR)/cron.init $(ROOT)/etc/init.d/cron && \
|
install -v -m 755 $(SLDIR)/cron.init $(ROOT)/etc/init.d/cron && \
|
||||||
install -v -m 600 $(SNAPDIR)/crontab \
|
install -v -m 755 $(SLDIR)/runall $(ROOT)/bin
|
||||||
$(ROOT)/usr/share/cron/crontab && \
|
|
||||||
install -v -m 755 $(SNAPDIR)/runall $(ROOT)/bin
|
|
||||||
|
|
||||||
test: $(ROOT)
|
test: $(ROOT)
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR); \
|
||||||
@@ -74,8 +72,9 @@ test: $(ROOT)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rvf $(ROOT) \
|
@rm -rvf $(ROOT) \
|
||||||
$(SNAPINFO) \
|
$(SLINFO) \
|
||||||
$(MANIFEST) \
|
$(MANIFEST) \
|
||||||
$(FILES) \
|
$(FILES) \
|
||||||
|
$(CONFIG) \
|
||||||
$(SRCDIR)
|
$(SRCDIR)
|
||||||
|
|
||||||
|
|||||||
@@ -36,13 +36,7 @@ case "$1" in
|
|||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
pid=$(pidofproc -p "$PIDFILE" "$DAEMON")
|
status_of_proc -p "$PIDFILE" "$DAEMON" || exit 1
|
||||||
|
|
||||||
if [ "$?" -ne 0 ]; then
|
|
||||||
echo "cron not running"
|
|
||||||
else
|
|
||||||
echo "cron running with PID: $pid"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 [start|stop|restart|status]"
|
echo "Usage: $0 [start|stop|restart|status]"
|
||||||
20
SL/usher
Executable file
20
SL/usher
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
preinst)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
postinst)
|
||||||
|
/etc/init.d/cron status 2>&1 > /dev/null && /etc/init.d/cron restart
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
prerm)
|
||||||
|
/etc/init.d/cron status 2>&1 > /dev/null && /etc/init.d/cron stop
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
postrm)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
21
SNAP/usher
21
SNAP/usher
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
preinst)
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
postinst)
|
|
||||||
[ -f "/run/cron.pid" ] && /etc/init.d/cron restart
|
|
||||||
[ -f "/etc/crontab" ] || cp /usr/share/cron/crontab /etc/crontab
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
prerm)
|
|
||||||
[ -f "/run/cron.pid" ] && /etc/init.d/cron stop
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
postrm)
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
Reference in New Issue
Block a user