Files
zulip/scripts/lib/check-upstart
Anders Kaseorg 392175d6e8 Use #!/usr/bin/env for bash shebangs.
/bin/sh and /usr/bin/env are the only two binaries that NixOS provides
at a fixed path (outside a buildFHSUserEnv sandbox).

This discussion was split from #11004.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-12-17 17:21:08 -08:00

12 lines
591 B
Bash
Executable File

#!/usr/bin/env 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