Files
zulip/scripts/setup/install
Anders Kaseorg edc5a7bdd0 install: Fix shellcheck warnings.
In scripts/setup/install line 18:
if [ $failed = 1 ]; then
     ^-- SC2086: Double quote to prevent globbing and word splitting.

In scripts/setup/install line 19:
    echo -e "\033[0;31m"
             ^-- SC1117: Backslash is literal in "\0". Prefer explicit escaping: "\\0".

In scripts/setup/install line 25:
    echo -e "\033[0m"
             ^-- SC1117: Backslash is literal in "\0". Prefer explicit escaping: "\\0".

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-08-03 09:15:26 -07:00

28 lines
875 B
Bash
Executable File

#!/bin/bash
#
# Thin wrapper around the actual install script (scripts/lib/install).
# The purpose of this wrapper is to log the full install script output
# to /var/log/zulip/install.log for easy debugging.
set -e
if [ "$EUID" -ne 0 ]; then
echo "Error: The installation script must be run as root" >&2
exit 1
fi
umask 022
mkdir -p /var/log/zulip
"$(dirname "$(dirname "$0")")/lib/install" "$@" 2>&1 | tee -a /var/log/zulip/install.log
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