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