From 0e0be33296a5174e5463c3bb0ab264b3b54a14f5 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 5 Dec 2013 15:21:06 +0100 Subject: [cron] new module for cron using our own patched sources. Has /etc/cron.d support, files there need to have 0600 permissions to run! --- remote/modules/cron/cron.build | 30 +++++++++++++++++++++ remote/modules/cron/cron.conf | 3 +++ .../systemd/system/basic.target.wants/cron.service | 1 + .../cron/data/etc/systemd/system/cron.service | 7 +++++ .../cron/vixie-cron-4.1-crondir-support.tgz | Bin 0 -> 64530 bytes 5 files changed, 41 insertions(+) create mode 100644 remote/modules/cron/cron.build create mode 100644 remote/modules/cron/cron.conf create mode 120000 remote/modules/cron/data/etc/systemd/system/basic.target.wants/cron.service create mode 100644 remote/modules/cron/data/etc/systemd/system/cron.service create mode 100644 remote/modules/cron/vixie-cron-4.1-crondir-support.tgz (limited to 'remote/modules') diff --git a/remote/modules/cron/cron.build b/remote/modules/cron/cron.build new file mode 100644 index 00000000..2f18b138 --- /dev/null +++ b/remote/modules/cron/cron.build @@ -0,0 +1,30 @@ +#!/bin/bash + + +fetch_source() { + + # use our own patched source + local TARBALL="vixie-cron-4.1-crondir-support.tgz" + [ ! -e "${TARBALL}" ] && perror "${TARBALL} not found under ${MODULE_DIR}." + + mkdir "${MODULE_DIR}/src" || perror "Could not create ${MODULE_DIR}/src" + tar xvfz "${TARBALL}" -C "${MODULE_DIR}/src" || perror "Could not extract ${TARBALL} to ${MODULE_DIR}/src" +} + +build() { + + # compilation + cd "${MODULE_DIR}/src" || perror "Could not cd to '${MODULE_DIR}/src'. Did fetch_source work?" + make || perror "Could not compile cron using 'make'." + + # installation + mkdir -p "${MODULE_BUILD_DIR}"/{usr/bin,usr/sbin} + DESTDIR="${MODULE_BUILD_DIR}" make install || perror "Could not 'make install' to ${MODULE_BUILD_DIR}" + + cd - &>/dev/null +} + +post_copy() { + : +} + diff --git a/remote/modules/cron/cron.conf b/remote/modules/cron/cron.conf new file mode 100644 index 00000000..8ecca658 --- /dev/null +++ b/remote/modules/cron/cron.conf @@ -0,0 +1,3 @@ +REQUIRED_BINARIES=" + cron +" diff --git a/remote/modules/cron/data/etc/systemd/system/basic.target.wants/cron.service b/remote/modules/cron/data/etc/systemd/system/basic.target.wants/cron.service new file mode 120000 index 00000000..8c1084c3 --- /dev/null +++ b/remote/modules/cron/data/etc/systemd/system/basic.target.wants/cron.service @@ -0,0 +1 @@ +../cron.service \ No newline at end of file diff --git a/remote/modules/cron/data/etc/systemd/system/cron.service b/remote/modules/cron/data/etc/systemd/system/cron.service new file mode 100644 index 00000000..2c5b832a --- /dev/null +++ b/remote/modules/cron/data/etc/systemd/system/cron.service @@ -0,0 +1,7 @@ +[Unit] +Description=CRON + +[Service] +Type=forking +ExecStart=/usr/sbin/cron +ExecStop=/opt/openslx/bin/kill -TERM $MAINPID diff --git a/remote/modules/cron/vixie-cron-4.1-crondir-support.tgz b/remote/modules/cron/vixie-cron-4.1-crondir-support.tgz new file mode 100644 index 00000000..0c6e1101 Binary files /dev/null and b/remote/modules/cron/vixie-cron-4.1-crondir-support.tgz differ -- cgit v1.2.3-55-g7522