1
0
mirror of https://github.com/azlux/log2ram.git synced 2023-10-10 13:37:24 +02:00

Update install.sh

Suppress "file not found" error when testing for init
This commit is contained in:
MegaV0lt 2019-09-24 12:59:27 +02:00 committed by GitHub
parent fdb0cfee4e
commit 3740b50ec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,10 +3,10 @@
[ "$(id -u)" -eq 0 ] || { echo "You need to be ROOT (sudo can be used)"; exit 1; } [ "$(id -u)" -eq 0 ] || { echo "You need to be ROOT (sudo can be used)"; exit 1; }
# See if we can find out the init-system # See if we can find out the init-system
echo "Try to detect init..." echo "Try to detect init and running log2ram service..."
if [ "$(systemctl --version)" != '' ] ; then if [ "$(systemctl --version 2> /dev/null)" != '' ] ; then
INIT='systemd' INIT='systemd'
elif [ "$(rc-service --version)" != '' ] ; then elif [ "$(rc-service --version 2> /dev/null)" != '' ] ; then
INIT='openrc' INIT='openrc'
fi fi