Shell Administration Scripts
From Veximwiki
Shell Administration Scripts
Here's a little startup for all shell-lovers.
First a config.inc
#!/bin/bash # admin-script # configuration ######################################## # be verbose ? VERBOSE=1 # password-hint file, chmod 600 !!! MPASSFILE=mailpasses #MYSQL-Admin (debian only... perhaps need to CHANGE) MYADMIN="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
A common functions.inc for more often used procedures
#!/bin/bash
# admin-script
# common function
########################################
### a nice red output for errormsg
function errorecho {
colors=`tput colors`
if [ $colors -gt -1 ] ; then
tput setaf 1
echo $1 1>
