File: postinst

package info (click to toggle)
hardinfo 2.2.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,040 kB
  • sloc: ansic: 40,169; cpp: 1,216; sh: 340; xml: 81; python: 50; makefile: 3
file content (24 lines) | stat: -rwxr-xr-x 794 bytes parent folder | download | duplicates (5)
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