diff options
author | David Runge <dave@sleepmap.de> | 2017-06-26 15:52:04 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2017-06-26 15:52:04 +0200 |
commit | f7aeb073e09c5118063108659550743c1bd04755 (patch) | |
tree | a336c6ddf001eff77ad2fcedb669f1f50e5e77f2 /system/update-motd.service | |
parent | bd0dad221eabfcd94d0848d022c61e06b30843b9 (diff) | |
parent | 8b3300b9a7105fa34252c90e30e43296d04eeb39 (diff) | |
download | uenv-f7aeb073e09c5118063108659550743c1bd04755.tar.gz uenv-f7aeb073e09c5118063108659550743c1bd04755.tar.bz2 uenv-f7aeb073e09c5118063108659550743c1bd04755.tar.xz uenv-f7aeb073e09c5118063108659550743c1bd04755.zip |
Merge branch 'master' of sleepmap.de:software/uenv0.9
* 'master' of sleepmap.de:software/uenv:
README.rst: Adding working homepage link for XenGi.
bin/update-motd: Fix non-zero exit code in bashs safe mode.
user/postpone-screensaver.service: Moving executable to /usr/bin. scripts/{postpone-screensaver,update-motd}: moving to bin subfolder for better distinction from scripts.
scripts/update-motd,system/update-motd.service: Adding script to be called by update-motd.service instead of using so many sh invocations in the service file.
Diffstat (limited to 'system/update-motd.service')
-rw-r--r-- | system/update-motd.service | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/system/update-motd.service b/system/update-motd.service index a821688..740ea7b 100644 --- a/system/update-motd.service +++ b/system/update-motd.service @@ -1,23 +1,12 @@ [Unit] Description=Update MOTD +After=multi-user.target network.target [Service] -Type=oneshot -ExecStart=/usr/bin/sh -c 'if [ -s /etc/motd.name ] ; then cat /etc/motd.name > /tmp/motd ; else cat /etc/hostname | banner -w 80 > /tmp/motd && echo >> /tmp/motd ; fi' -ExecStart=/usr/bin/sh -c 'uname -a >> /tmp/motd' -ExecStart=/usr/bin/sh -c 'echo >> /tmp/motd' -ExecStart=-/usr/bin/sh -c 'pacman -Sy 2>&1 > /dev/null' -ExecStart=/usr/bin/sh -c 'echo "Package updates available:" >> /tmp/motd' -ExecStart=-/usr/bin/sh -c 'pacman -Qu >> /tmp/motd' -ExecStart=/usr/bin/sh -c 'echo >> /tmp/motd' -ExecStart=/usr/bin/sh -c 'echo "Security updates needed:" >> /tmp/motd' -ExecStart=/usr/bin/sh -c 'if [ -x /usr/bin/arch-audit ]; then arch-audit -uf "%n|%c" >> /tmp/motd ; else echo "Install arch-audit from AUR." >> /tmp/motd ; fi' -ExecStart=/usr/bin/sh -c 'if [ -x /usr/bin/lolcat ] ; then lolcat /tmp/motd > /etc/motd ; else mv /tmp/motd /etc/motd ; fi' +ExecStart=/usr/bin/update-motd PrivateDevices=yes PrivateTmp=yes ProtectSystem=full ReadWriteDirectories=/etc/motd ProtectHome=yes NoNewPrivileges=yes - - |