MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /etc/rc3.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //etc/rc3.d/S44acpid
#!/bin/bash
#
#	/etc/rc.d/init.d/acpid
#
# Starts the acpi daemon
#
# chkconfig: 345 44 56
# description: Listen and dispatch ACPI events from the kernel
# processname: acpid

# Source function library.
. /etc/rc.d/init.d/functions

[ -x /usr/sbin/acpid ] || exit 0
[ -f /proc/acpi/event ] || exit 0

RETVAL=0

#
# See how we were called.
#

start() {
	# Check if it is already running
	if [ ! -f /var/lock/subsys/acpid ]; then
	    echo -n $"Starting acpi daemon: "
	    daemon /usr/sbin/acpid
	    RETVAL=$?
	    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid
	    echo
	fi
	return $RETVAL
}

stop() {
	echo -n $"Stopping acpi daemon: "
	killproc /usr/sbin/acpid
	RETVAL=$?
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/acpid
	echo
        return $RETVAL
}


restart() {
	stop
	start
}	

reload() {
	trap "" SIGHUP
	killall -HUP acpid
}	

case "$1" in
start)
	start
	;;
stop)
	stop
	;;
reload)
	reload
	;;
restart)
	restart
	;;
condrestart)
	if [ -f /var/lock/subsys/acpid ]; then
	    restart
	fi
	;;
status)
	status acpid
	;;
*)
	echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
	exit 1
esac

exit $RETVAL

Anon7 - 2021