Made motd msg work in Centos,

updated motd display to first check if file exists
This commit is contained in:
2020-12-03 14:07:35 +01:00
parent eb83d11538
commit 7fb0470f44
4 changed files with 11 additions and 6 deletions

View File

@@ -274,4 +274,4 @@ systemctl reload fail2ban
##-------##
msg " Added CMS!"
for f in /etc/update-motd.d/51*; do bash $f; done
if stat --printf='' /etc/update-motd.d/51* 2>/dev/null; then for f in /etc/update-motd.d/51*; do bash $f; done; fi