Add multiplane.sh
This commit is contained in:
33
multiplane.sh
Normal file
33
multiplane.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "$EUID" -ne 0 ]]; then
|
||||
echo -e "\e[31m[FATAL]\e[39m Currently this script requires being ran as root user - please try again as root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "\n\nINSTALL LOG: $(date --rfc-3339=seconds)\n" >> /tmp/multiplane.log
|
||||
|
||||
info() {
|
||||
echo -e "\e[34m[INFO]\e[39m $1"
|
||||
echo "[INFO] $1" >> /tmp/multiplane.log
|
||||
}
|
||||
|
||||
debug() {
|
||||
if [[ ! -z "$DEBUG" ]]; then
|
||||
echo -e "\e[96m[DEBUG]\e[39m $1"
|
||||
fi
|
||||
echo "[DEBUG] $1" >> /tmp/multiplane.log
|
||||
}
|
||||
|
||||
warn() {
|
||||
echo -e "\e[33m[WARNING]\e[39m $1"
|
||||
echo "[WARNING] $1" >> /tmp/multiplane.log
|
||||
}
|
||||
|
||||
fatal() {
|
||||
echo -e "\e[31m[FATAL]\e[39m $1"
|
||||
echo "[FATAL] $1" >> /tmp/multiplane.log
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user