Add error handing to Arch Linux installation script
This commit is contained in:
parent
2c8bb14508
commit
a9f63b05c7
6
install/install_arch.sh
Normal file → Executable file
6
install/install_arch.sh
Normal file → Executable 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
|
||||
|
Loading…
Reference in New Issue
Block a user