mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 23:25:53 -05:00
Fixed installer, so propertly detects service platform type
This commit is contained in:
parent
d8a1812ba4
commit
673e00f51a
@ -13,12 +13,13 @@ CheckStartupType() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# echo "Checking process autostart system..."
|
# echo "Checking process autostart system..."
|
||||||
starttype=`ps -p 1 -o command= | awk '{ a=split($0, res, "/"); split(res[a], f, " "); print f[1]}'`
|
starttype1=`cat /proc/1/status | grep 'Name:' | awk '{ print $2; }'`
|
||||||
|
starttype2=`ps -p 1 -o command= | awk '{a=split($0,res," "); b=split(res[a],tp,"/"); print tp[b]; }'`
|
||||||
|
|
||||||
# Systemd
|
# Systemd
|
||||||
if [[ $starttype == 'systemd' ]]
|
if [[ $starttype1 == 'systemd' ]]
|
||||||
then return 1;
|
then return 1;
|
||||||
elif [[ $starttype == 'init' ]]
|
elif [[ $starttype1 == 'init' || $starttype2 == 'init' ]]
|
||||||
then
|
then
|
||||||
if [ -d "/etc/init" ]
|
if [ -d "/etc/init" ]
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user