updated script to use colour vars
This commit is contained in:
parent
a8f53c8a3b
commit
e68bb5f429
16
customize.sh
16
customize.sh
@ -14,19 +14,21 @@ mag="\e[95m"
|
||||
err="\e[1;31m"
|
||||
ok="\e[1;32m"
|
||||
|
||||
|
||||
### Verify this script is running as root, otherwise exit with notification
|
||||
if [ $(id -u) -ne 0 ]; then
|
||||
echo -e "\n\e[1;31mThis script MUST be run as ROOT. Exiting\e[0m"
|
||||
echo -e "\n${err}This script MUST be run as ROOT. Exiting${norm}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
### Let user know what's happening
|
||||
echo -e "\nThis script will copy TEMPLATE files to various locations in order to customize"
|
||||
echo -e "\n${norm}This script will copy TEMPLATE files to various locations in order to customize"
|
||||
echo "your system. Backups will be created in-place with the extension '.original'"
|
||||
echo -e "\n\e[0;33mPlease note: It's still up to you to customize the template files with settings"
|
||||
echo -e "\n${yellow}Please note: It's still up to you to customize the template files with settings"
|
||||
echo "appropriate to your environment!"
|
||||
echo -e "\n\e[0;36mDetails about template files are in the readme.md files within each directory"
|
||||
echo -e "in this archive.\e[0m\n"
|
||||
echo -e "\n${cyan}Details about template files are in the readme.md files within each directory"
|
||||
echo -e "in this archive.${norm}\n"
|
||||
|
||||
### Copy files to proper locations
|
||||
|
||||
@ -73,8 +75,8 @@ cp -f /etc/ssh/sshd_config /etc/ssh/sshd_config.original
|
||||
# copy new
|
||||
cp -f config/etc/ssh/sshd_config /etc/ssh/sshd_config
|
||||
echo "...done"
|
||||
COMMENTBLOCK
|
||||
|
||||
### Exit gracefully
|
||||
echo -e "\n\e[0;32mAll done!\n\e[0m"
|
||||
echo -e "\n${ok}All done!${norm}\n"
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user