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 :  /usr/local/src/apcupsd-3.14.10/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/src/apcupsd-3.14.10/examples/safe.apccontrol.in
#!@SCRIPTSHELL@
#
#    Safe apccontrol for testing.
#
#  This apccontrol can be used for testing without fear
#  that it will bring your system down
#     @configure_input@
#
prefix=@prefix@
exec_prefix=@exec_prefix@
APCUPSD=@sbindir@/apcupsd
SHUTDOWN=@SHUTDOWN@
SCRIPTDIR=@sysconfdir@

#
case "$1" in
        killpower)
                wall <<EOF
apccontrol: ${APCUPSD} --killpower would have been.

EOF
        ;;
        commfailure)
                wall <<EOF
apccontrol: Communications with UPS lost.

EOF
        ;;
        commok)
                wall <<EOF
apccontrol: Communciations with UPS restored.

EOF
        ;;
        powerout)
                wall <<EOF
apccontrol: Warning power loss detected.

EOF
        ;;
        onbattery)
                wall <<EOF
apccontrol: Power failure. Running on UPS batteries.

EOF
        ;;
        offbattery)
                wall <<EOF
apccontrol: Off battery. Mains returned.

EOF
        ;;
        failing)
                wall <<EOF
apccontrol: UPS battery power exhaused. Doing shutdown.

EOF
        ;;
        timeout)
                wall <<EOF
apccontrol: UPS battery runtime limit exceeded. Doing shutdown.

EOF
        ;;
        loadlimit)
                wall <<EOF
apccontrol: UPS battery discharge limit reached. Doing shutdown.

EOF
        ;;
        runlimit)
                wall <<EOF
apccontrol: UPS battery runtime percent reached. Doing shutdown.

EOF
        ;;
        doreboot)
                wall <EOF
apccontrol: ${SHUTDOWN} for reboot would have been called.

EOF
        ;;
        doshutdown)
                wall <<EOF
apccontrol: ${SHUTDOWN} for halt would have been called.

EOF
        ;;
        mainsback)
                wall <<EOF
apccontrol: Power has returned...

EOF
        ;;
        annoyme)
                wall <<EOF
apccontrol: Power problems please logoff.

EOF
        ;;
        emergency)
                wall <<EOF
apccontrol: ${SHUTDOWN} for emergency halt would have been called.

EOF
        ;;
        changeme)
                wall <<EOF
apccontrol: Emergency! UPS batteries have failed.

Change them NOW !
EOF
        ;;
        remotedown)
                wall <<EOF
apccontrol: ${SHUTDOWN} for remote halt would have been called.

EOF
        ;;
        startselftest)
                wall <<EOF
apccontrol: start self test would have been called.

EOF
        ;;
        endselftest)
                wall <<EOF
apccontrol: end self test would have been called.

EOF
        ;;
        *)      echo "Usage: ${0##*/} command"
                echo "       warning: this script is intended to be launched by"
                echo "       apcupsd and should never be launched by users."
                exit 1
        ;;
esac

Anon7 - 2021