First check in

This commit is contained in:
2018-06-04 16:59:38 -05:00
commit f23031c8e3
9 changed files with 7081 additions and 0 deletions

5
SNAP/README Normal file
View File

@@ -0,0 +1,5 @@
This is the directory where the manifest, snapinfo,
and files.tar.gz files will be created. It is also
where the usher file should be placed if it is
required by the package. Any other files that need
to be included could also be placed here.

53
SNAP/cron.init Executable file
View File

@@ -0,0 +1,53 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: cron
# Required-Start: $remote_fs $syslog $time
# Required-Stop: $remote_fs $syslog $time
# Should-Start: $network $named slapd autofs ypbind nscd nslcd
# Should-Stop: $network $named slapd autofs ypbind nscd nslcd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Regular background program processing daemon
# Description: cron is a standard UNIX program that runs user-specified
# programs at periodic scheduled times. vixie cron adds a
# number of features to the basic UNIX cron, including better
# security and more powerful configuration options.
### END INIT INFO
DAEMON=/sbin/cron
PIDFILE=/var/run/cron.pid
. /lib/lsb/init-functions
[ -r /etc/default/cron ] && . /etc/default/cron
case "$1" in
start)
log_init_msg "Starting cron"
start_daemon -p "$PIDFILE" "$DAEMON" "$CRONARGS" && log_success_msg || \
log_failure_msg
;;
stop)
log_init_msg "Stopping cron"
killproc -p "$PIDFILE" "$DAEMON" && log_success_msg || log_failure_msg
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
pid=$(pidofproc -p "$PIDFILE" "$DAEMON")
if [ "$?" -ne 0 ]; then
echo "cron not running"
else
echo "cron running with PID: $pid"
fi
;;
*)
echo "Usage: $0 [start|stop|restart|status]"
exit 1
;;
esac
exit 0

11
SNAP/crontab Normal file
View File

@@ -0,0 +1,11 @@
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# we use the runall script to execute any scripts in the cron.hourly,
# cron.daily, cron.weekly, and cron.monthly directories
# m h dom mon dow user command
17 * * * * root cd / && runall /etc/cron.hourly
25 6 * * * root cd / && runall /etc/cron.daily
47 6 * * 7 root cd / && runall /etc/cron.weekly
52 6 1 * * root cd / && runall /etc/cron.monthly

21
SNAP/usher Executable file
View File

@@ -0,0 +1,21 @@
#!/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