Judge systemd

pull/1/head
Dct Mei 2020-03-24 19:21:13 +08:00
parent cb0fa9fde1
commit 62cfaac56f
No known key found for this signature in database
GPG Key ID: 50BF8B712DCAD7EA
1 changed files with 4 additions and 0 deletions

View File

@ -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'