From cd0ab85715fc6311850f79b6615376f808b6880b Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 30 Apr 2019 00:08:22 +0200 Subject: [PATCH] daily autocommit --- .etckeeper | 1 + cron.d/greetings | 4 ++-- motd.tail | 6 ++++++ update-motd.d/50-motd-news | 28 +++++++++++++++++++++++++++- 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 motd.tail diff --git a/.etckeeper b/.etckeeper index 06d27b5..198e52c 100755 --- a/.etckeeper +++ b/.etckeeper @@ -2283,6 +2283,7 @@ maybe chmod 0644 'mono/4.5/web.config' maybe chmod 0644 'mono/browscap.ini' maybe chmod 0755 'mono/certstore' maybe chmod 0644 'mono/config' +maybe chmod 0644 'motd.tail' maybe chmod 0755 'mplayer' maybe chmod 0644 'mplayer/input.conf' maybe chmod 0644 'mplayer/menu.conf' diff --git a/cron.d/greetings b/cron.d/greetings index a3bf1b4..24a6714 100644 --- a/cron.d/greetings +++ b/cron.d/greetings @@ -1,3 +1,3 @@ # Eine nette Begrüßung ... -1,11,21,31,41,51 * * * * root test -x /root/bin/generate-motd.sh && /root/bin/generate-motd.sh >/dev/null -@reboot root test -x /root/bin/generate-motd.sh && /root/bin/generate-motd.sh >/dev/null +#1,11,21,31,41,51 * * * * root test -x /root/bin/generate-motd.sh && /root/bin/generate-motd.sh >/dev/null +#@reboot root test -x /root/bin/generate-motd.sh && /root/bin/generate-motd.sh >/dev/null diff --git a/motd.tail b/motd.tail new file mode 100644 index 0000000..2fadcb6 --- /dev/null +++ b/motd.tail @@ -0,0 +1,6 @@ + ____ _ +| __ ) _ __ _ _ _ __ (_) +| _ \| '__| | | | '_ \| | +| |_) | | | |_| | | | | | +|____/|_| \__,_|_| |_|_| + diff --git a/update-motd.d/50-motd-news b/update-motd.d/50-motd-news index 1a24852..b97dc05 100755 --- a/update-motd.d/50-motd-news +++ b/update-motd.d/50-motd-news @@ -1 +1,27 @@ -#!/bin/sh +#!/bin/bash + +export LC_ALL=de_DE.utf8 + +uname -a +/usr/bin/lsb_release -d | sed -e 's/^[ ]*Description[ ]*:[ ]*//' + +if [[ -f /etc/motd.tail ]] ; then + cat /etc/motd.tail +fi + +if [[ -x /usr/bin/fortune ]] ; then + echo + /usr/bin/fortune de +elif [[ -x /usr/games/fortune ]] ; then + echo + /usr/games/fortune de +fi + +if [[ -x /usr/bin/ddate ]] ; then + echo + /usr/bin/ddate +fi + +echo + +# vim: ts=4 expandtab list -- 2.39.5