1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#/bin/sh
if [ -e /bin/systemctl ] && [ ! -e /etc/mx-version ] ; then
systemctl daemon-reload
systemctl enable hardinfo2
systemctl start hardinfo2
echo "Service Installed... (SystemD)"
elif [ -e /sbin/chkconfig ] ; then
chkconfig --add hardinfo2
chkconfig hardinfo2 on
/etc/init.d/hardinfo2 start
echo "Service Installed... (SystemV)"
elif [ -e /sbin/sv ] ; then
ln -s /etc/sv/hardinfo2 /etc/runit/runsvdir/default/
/etc/sv/hardinfo2/run
echo "Service Installed... (Runit)"
elif [ -e /sbin/rc-update ] ; then
rc-update add hardinfo2 default
rc-service hardinfo2 start
echo "Service Installed... (SystemV-openrc)"
else
update-rc.d hardinfo2 defaults 95 10
/etc/init.d/hardinfo2 start
echo "Service Installed... (SystemV-rc)"
fi
|