mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
install: Add clear error message if upstart is installed on Xenial.
Fixes #2199.
This commit is contained in:
11
scripts/lib/check-upstart
Executable file
11
scripts/lib/check-upstart
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
release=$(lsb_release -sc)
|
||||||
|
|
||||||
|
if [ "$release" = "xenial" ] && [ -x /sbin/start ] && [ -x /sbin/stop ] && [ -x /sbin/restart ] && [ -x /sbin/status ] && [ -x /sbin/initctl ]; then
|
||||||
|
echo "You appear to be running Ubuntu Xenial, but with the upstart package installed."
|
||||||
|
echo "In Ubuntu Xenial, upstart has been replaced by systemd, and having upstart"
|
||||||
|
echo "installed will break the init scripts for Zulip dependencies like nginx."
|
||||||
|
echo "Please uninstall the \"upstart\" package (apt-get remove upstart) and rerun"
|
||||||
|
echo "this install script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -27,6 +27,9 @@ ZULIP_PATH="$(realpath $(dirname $0)/../..)"
|
|||||||
apt-get -y dist-upgrade $APT_OPTIONS
|
apt-get -y dist-upgrade $APT_OPTIONS
|
||||||
apt-get install -y puppet git python python3 python-six python3-six crudini $ADDITIONAL_PACKAGES
|
apt-get install -y puppet git python python3 python-six python3-six crudini $ADDITIONAL_PACKAGES
|
||||||
|
|
||||||
|
# Handle issues around upstart on Ubuntu Xenial
|
||||||
|
"$ZULIP_PATH"/scripts/lib/check-upstart
|
||||||
|
|
||||||
# Create and activate a virtualenv
|
# Create and activate a virtualenv
|
||||||
if [ "$VIRTUALENV_NEEDED" = "yes" ]; then
|
if [ "$VIRTUALENV_NEEDED" = "yes" ]; then
|
||||||
"$ZULIP_PATH"/scripts/lib/create-production-venv "$ZULIP_PATH"
|
"$ZULIP_PATH"/scripts/lib/create-production-venv "$ZULIP_PATH"
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ args = parser.parse_args()
|
|||||||
deploy_path = args.deploy_path
|
deploy_path = args.deploy_path
|
||||||
os.chdir(deploy_path)
|
os.chdir(deploy_path)
|
||||||
|
|
||||||
|
# Handle issues around upstart on Ubuntu Xenial
|
||||||
|
subprocess.check_call(["./scripts/lib/check-upstart"])
|
||||||
|
|
||||||
if not args.skip_puppet:
|
if not args.skip_puppet:
|
||||||
logging.info("Upgrading system packages...")
|
logging.info("Upgrading system packages...")
|
||||||
subprocess.check_call(["apt-get", "update"])
|
subprocess.check_call(["apt-get", "update"])
|
||||||
|
|||||||
Reference in New Issue
Block a user