Serveur-motd/source/debian/postinst
2019-02-19 12:13:28 +01:00

15 lines
411 B
Bash

#!/bin/bash
#Disable the motd in SSH Server
sed -i 's/#PrintMotd yes/PrintMotd no/g' /etc/ssh/sshd_config
#Enable motd for bash user
echo "/usr/local/bin/coldmotd" > /etc/profile.d/coldmotd.sh
chmod +x /etc/profile.d/coldmotd.sh
# for zsh users
if [ -f "/usr/bin/zsh" ];then
echo "/usr/local/bin/coldmotd" >> ~/.zprofile;
fi
#disable the system motd
echo "" > /etc/motd
chmod +x /usr/local/bin/coldmotd
exit 0