HEX
Server: Apache/2.4.6 () OpenSSL/1.0.2k-fips PHP/8.3.8
System: Linux gateway.rmc-logistics.net 4.1.12-124.48.6.el7uek.x86_64 #2 SMP Tue Mar 16 14:57:50 PDT 2021 x86_64
User: apache (48)
PHP: 8.3.8
Disabled: NONE
Upload Files
File: //lib64/pm-utils/bin/service
#!/bin/sh

# Handle service invocation on distros that do not have a "service" command.
# It handles LSB by default, and other distros that the maintainer is aware of.


REL="/etc/slackware-release /etc/slackware-version 
     /etc/arch-release"

svc="/etc/init.d/$1"

exists() { [ -x "$svc" ]; }
start() { "$svc" start; }
stop() { "$svc" stop; }
status() { "$svc" status; }
    

for rel in $REL; do
    [ -f "$rel" ] || continue
    case $rel in
	*slackware*) svc="/etc/rc.d/rc.$1";;
	*arch*) svc="/etc/rc.d/$1"
	        status() { [ -e "/var/run/daemons/$1" ] && echo "$1 running"; }
		;;
    esac
    break
done

exists || { echo "$1: unrecognized service or non-LSB Linux distro"; exit 1; }

case $2 in
    start|stop|status) "$2"  ;;
    restart) stop; start ;;
    *) echo "$2: Unrecognized service command"
       exit 1 ;;
esac