diff options
author | Sebastian | 2016-04-25 12:01:08 +0200 |
---|---|---|
committer | Sebastian | 2016-04-25 12:01:08 +0200 |
commit | 5acda3eaeabae9045609539303a8c12c4ce401f1 (patch) | |
tree | 7e71975f8570b05aafe2ea6ec0e242a8912387bb /core/modules/cron/data | |
parent | initial commit (diff) | |
download | mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.gz mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.xz mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.zip |
merge with latest dev version
Diffstat (limited to 'core/modules/cron/data')
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 + |