summaryrefslogtreecommitdiffstats
path: root/core/modules/cron/data
diff options
context:
space:
mode:
authorSebastian2016-04-25 12:01:08 +0200
committerSebastian2016-04-25 12:01:08 +0200
commit5acda3eaeabae9045609539303a8c12c4ce401f1 (patch)
tree7e71975f8570b05aafe2ea6ec0e242a8912387bb /core/modules/cron/data
parentinitial commit (diff)
downloadmltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.gz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.xz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.zip
merge with latest dev version
Diffstat (limited to 'core/modules/cron/data')
-rw-r--r--core/modules/cron/data/etc/cron.d/.placeholder2
-rw-r--r--core/modules/cron/data/etc/systemd/system/cron.service10
l---------core/modules/cron/data/etc/systemd/system/multi-user.target.wants/cron.service1
-rwxr-xr-xcore/modules/cron/data/opt/openslx/scripts/cron-sendmail30
4 files changed, 43 insertions, 0 deletions
diff --git a/core/modules/cron/data/etc/cron.d/.placeholder b/core/modules/cron/data/etc/cron.d/.placeholder
new file mode 100644
index 00000000..98d2cd16
--- /dev/null
+++ b/core/modules/cron/data/etc/cron.d/.placeholder
@@ -0,0 +1,2 @@
+# DO NOT EDIT OR REMOVE
+# This file is a simple placeholder to keep git from removing this directory
diff --git a/core/modules/cron/data/etc/systemd/system/cron.service b/core/modules/cron/data/etc/systemd/system/cron.service
new file mode 100644
index 00000000..d2c09ebb
--- /dev/null
+++ b/core/modules/cron/data/etc/systemd/system/cron.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Cron Daemon (cronie)
+After=auditd.service nss-user-lookup.target systemd-user-sessions.service time-sync.target ypbind.service
+
+[Service]
+ExecStart=/opt/openslx/sbin/crond -n
+Restart=on-failure
+ExecReload=/opt/openslx/bin/kill -HUP $MAINPID
+KillMode=process
+
diff --git a/core/modules/cron/data/etc/systemd/system/multi-user.target.wants/cron.service b/core/modules/cron/data/etc/systemd/system/multi-user.target.wants/cron.service
new file mode 120000
index 00000000..8c1084c3
--- /dev/null
+++ b/core/modules/cron/data/etc/systemd/system/multi-user.target.wants/cron.service
@@ -0,0 +1 @@
+../cron.service \ No newline at end of file
diff --git a/core/modules/cron/data/opt/openslx/scripts/cron-sendmail b/core/modules/cron/data/opt/openslx/scripts/cron-sendmail
new file mode 100755
index 00000000..3ce2a19d
--- /dev/null
+++ b/core/modules/cron/data/opt/openslx/scripts/cron-sendmail
@@ -0,0 +1,30 @@
+#!/bin/ash
+
+. /opt/openslx/config
+
+if [ "x$SLX_CRON_MAIL" = "xslxlog" ]; then
+ # slxlog handling - special case
+ TMP=$(mktemp)
+ cat > "$TMP"
+
+ SUBJ=$(grep '^Subject: .*$' "$TMP" | cut -c 10-)
+
+ if [ -n "$SUBJ" ]; then
+ slxlog "cron" "$SUBJ" "$TMP"
+ fi
+
+ rm -f -- "$TMP"
+elif [ -n "$SLX_CRON_MAIL" ] && [ -x "$SLX_CRON_MAIL" ]; then
+ # see if SLX_CRON_MAIL is a valid binary and use that
+ $SLX_CRON_MAIL $@
+elif which sendmail 2> /dev/null; then
+ # fallback to sendmail
+ sendmail $@
+elif which logger 2> /dev/null; then
+ # nothing worked, write to syslog if logger is present
+ TMP=$(mktemp /tmp/cron.XXXXXXXX)
+ cat > "$TMP"
+ chmod 0600 "$TMP"
+ logger "cron tried to mail, but no mailer found! Mail dumped to $TMP"
+fi
+