|
|
|
@ -7,7 +7,12 @@ |
|
|
|
MOTD="/etc/motd" |
|
|
|
MOTD="/etc/motd" |
|
|
|
INSTPATH="/etc/bmotd.sh" |
|
|
|
INSTPATH="/etc/bmotd.sh" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check if root |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main () { |
|
|
|
main () { |
|
|
|
|
|
|
|
isRoot && echo 'You are root' || echo 'You are NOT root' |
|
|
|
|
|
|
|
|
|
|
|
# Gather information |
|
|
|
# Gather information |
|
|
|
HOSTNAME=$(hostname -s) |
|
|
|
HOSTNAME=$(hostname -s) |
|
|
|
FQDN=$(hostname -f) |
|
|
|
FQDN=$(hostname -f) |
|
|
|
@ -206,6 +211,9 @@ function parse_ifconfig() { |
|
|
|
done; |
|
|
|
done; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function isRoot() { |
|
|
|
|
|
|
|
! (( ${EUID:-0} || $(id -u) )) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
motdGen() { |
|
|
|
motdGen() { |
|
|
|
# The different colours as variables |
|
|
|
# The different colours as variables |
|
|
|
|