File: postinst

package info (click to toggle)
nut 0.45.5-rel-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,984 kB
  • ctags: 2,146
  • sloc: ansic: 22,216; sh: 1,138; makefile: 405
file content (41 lines) | stat: -rw-r--r-- 657 bytes parent folder | download
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
#!/bin/sh

# source the debconf library
. /usr/share/debconf/confmodule

case "$1" in

  configure)
    # create a symbolic link for "ups-monitor"
    ln -sf /etc/init.d/nut /etc/init.d/ups-monitor
    chown nut.nut /etc/nut/*
    chmod 640 /etc/nut/upsd.conf /etc/nut/upsmon.conf
    chown nut.nut /var/run/nut
    chmod 750 /var/run/nut
    ;;

  abort-upgrade)
    # do nothing
    ;;

  abort-remove)
    # do nothing
    ;;

  abort-deconfigure)
    # do nothing
    ;;

  *)
    echo "$0: incorrect arguments: $*" >&2
    exit 1
    ;;

esac

/etc/init.d/nut stop
#DEBHELPER#

# handle upsmon failing to close
# all inherited file descriptors
db_stop