From 62cfaac56fa35454eb54ab4ea2b5608a76c1f671 Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Tue, 24 Mar 2020 19:21:13 +0800 Subject: [PATCH] Judge systemd --- install-release.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install-release.sh b/install-release.sh index e029fd3..b9a1540 100644 --- a/install-release.sh +++ b/install-release.sh @@ -56,6 +56,10 @@ if [[ "$(uname)" == 'Linux' ]]; then if [[ ! -f '/etc/os-release' ]]; then echo "error: Don't use outdated Linux distributions." exit 1 + if [[ -z "$(ls -l /sbin/init | grep systemd)" ]]; then + echo "error: Only Linux distributions using systemd are supported." + exit 1 + fi fi if [[ "$(command -v apt)" ]]; then PACKAGE_MANAGEMENT_UPDATE='apt update'