OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

D.17. /etc/rc.d/init.d/sendsignals‌


#!/bin/sh

########################################################################

# Begin sendsignals

#

# Description : Sendsignals Script

#

#!/bin/sh

########################################################################

# Begin sendsignals

#

# Description : Sendsignals Script

#


# Authors

#

# Update

#

# Version

#

# Authors

#

# Update

#

# Version

#


########################################################################

########################################################################


### BEGIN INIT INFO

# Provides:

# Required-Start:

# Should-Start:

# Required-Stop:

# Should-Stop:

# Default-Start:

# Default-Stop:

# Short-Description:

# Description:

# X-LFS-Provided-By:

### END INIT INFO

### BEGIN INIT INFO

# Provides:

# Required-Start:

# Should-Start:

# Required-Stop:

# Should-Stop:

# Default-Start:

# Default-Stop:

# Short-Description:

# Description:

# X-LFS-Provided-By:

### END INIT INFO


. /lib/lsb/init-functions


case "${1}" in stop)

log_info_msg "Sending all processes the TERM signal..." killall5 -15

error_value=${?}

. /lib/lsb/init-functions


case "${1}" in stop)

log_info_msg "Sending all processes the TERM signal..." killall5 -15

error_value=${?}



sleep ${KILLDELAY}


if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then log_success_msg

else

log_failure_msg

fi


log_info_msg "Sending all processes the KILL signal..." killall5 -9

error_value=${?} sleep ${KILLDELAY}

if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then log_success_msg

else

log_failure_msg

fi

;;


*)

echo "Usage: ${0} {stop}" exit 1

;;


esac exit 0

# End sendsignals

sleep ${KILLDELAY}


if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then log_success_msg

else

log_failure_msg

fi


log_info_msg "Sending all processes the KILL signal..." killall5 -9

error_value=${?} sleep ${KILLDELAY}

if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then log_success_msg

else

log_failure_msg

fi

;;


*)

echo "Usage: ${0} {stop}" exit 1

;;


esac exit 0

# End sendsignals


image

image

: Gerard Beekmans - [email protected] DJ Lucas - [email protected]

: Bruce Dubbs - [email protected]

: Gerard Beekmans - [email protected] DJ Lucas - [email protected]

: Bruce Dubbs - [email protected]

: LFS 7.0

: LFS 7.0

reboot

reboot

6

6

Top OS Cloud Computing at OnWorks: