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/rc.d/rc2.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //etc/rc.d/rc2.d/K10psacct
#!/bin/bash
#
# psacct	Script to control kernel process accounting
#
# Author:       Mike A. Harris <mharris@redhat.com>
#
# chkconfig: - 90 10
# description:  Starts and stops process accounting

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

# The location of the accounting file
ACCTFILE=/var/account/pacct

start() {
	[ ! -r $ACCTFILE ] && touch $ACCTFILE && chmod 600 $ACCTFILE
	action $"Starting process accounting: " /sbin/accton $ACCTFILE
	touch /var/lock/subsys/psacct
}

stop() {
	action $"Shutting down process accounting: " /sbin/accton
	rm -f /var/lock/subsys/psacct
}
# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	if [ -e /var/lock/subsys/psacct ]; then
		echo $"Process accounting is enabled."
	else
		echo $"Process accounting is disabled."
	fi
	;;
  restart|reload)
	stop
	start
	;;
  *)
	# do not advertise unreasonable commands that there is no reason
	# to use with this device
	echo $"Usage: $0 {start|stop|status|restart|reload}"
	exit 1
esac

exit 0


Anon7 - 2021