2013-11-14 06:32:49 +01:00
|
|
|
#!/bin/bash
|
2015-10-07 06:57:40 +02:00
|
|
|
set -e
|
2015-09-27 15:02:45 +02:00
|
|
|
if [ "$EUID" -ne 0 ]; then
|
|
|
|
echo "Error: The installation script must be run as root" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2017-03-26 00:41:09 +01:00
|
|
|
umask 022
|
2015-08-28 18:40:30 +02:00
|
|
|
mkdir -p /var/log/zulip
|
2016-08-01 00:30:42 +02:00
|
|
|
|
2015-09-26 03:47:30 +02:00
|
|
|
"$(dirname "$(dirname "$0")")/lib/install" "$@" 2>&1 | tee -a /var/log/zulip/install.log
|
2016-08-01 00:30:42 +02:00
|
|
|
failed=${PIPESTATUS[0]}
|
|
|
|
|
|
|
|
if [ $failed = 1 ]; then
|
|
|
|
echo -e "\033[0;31m"
|
|
|
|
echo "Zulip installation failed!"
|
|
|
|
echo
|
|
|
|
echo -n "The install process is designed to be idempotent, so you can retry "
|
|
|
|
echo -n "after resolving whatever issue caused the failure (there should be a traceback above). "
|
|
|
|
echo -n "A log of this installation is available in /var/log/zulip/install.log"
|
|
|
|
echo -e "\033[0m"
|
|
|
|
exit 1
|
|
|
|
fi
|