This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $? -ne 0 ]; then | |
echo "something went wrong!" | |
exit 1 | |
fi | |
if [ "$EUID" -ne 0 ]; then | |
echo "u drunk?" | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Preventing errors | |
[ $? -ne 0 ] && { echo "Error something went wrong! Installation aborted."; exit 1; } | |
set -e | |
[ "$EUID" -ne 0 ] && { echo "This script must be run as root. Installation aborted."; exit 2; } | |
# Application path | |
PW_DIR=$(pwd) | |
OPT_DIR="/opt" |