This file is indexed.

/usr/share/doc/apcupsd/examples/safe.apccontrol.in is in apcupsd-doc 3.14.10-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!@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