File: upsd

package info (click to toggle)
nut 2.8.0-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 15,212 kB
  • sloc: ansic: 92,222; sh: 8,037; cpp: 3,070; makefile: 2,302; python: 1,192; perl: 744; xml: 47
file content (19 lines) | stat: -rwxr-xr-x 425 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

# Include NUT nut.conf
[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf

case "$MODE" in
  standalone|netserver)
    exec /lib/nut/upsd "$@"
  ;;
  none|netclient)
    echo "upsd disabled, please adjust the configuration to your needs"
    echo "Then set MODE to a suitable value in /etc/nut/nut.conf to enable it"
    # exit success to avoid breaking the install process!
    exit 0
  ;;
  *)
    exit 1
  ;;
esac