Add error handing to Arch Linux installation script

This commit is contained in:
Arinerron 2019-03-28 11:08:36 -07:00
parent 2c8bb14508
commit a9f63b05c7
No known key found for this signature in database
GPG Key ID: 99383627861C62F0

6
install/install_arch.sh Normal file → Executable file
View File

@ -7,8 +7,12 @@ LOG_DIR='/var/log/onionr'
BRANCH='master'
# setup error handlers
set -e
trap "echo -e '\033[31mOnionr installation failed.\033[0m' >&2; exit 1337" ERR INT TERM
# require root permissions
if ! [ $(id -u) = 0 ]; then
@ -74,4 +78,6 @@ systemctl start onionr
# and we're good!
trap - ERR
exit 0