This file is indexed.

postrm is in daemontools-run 1:0.76-6.1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

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
#!/bin/sh
set -e

test "$1" = 'remove' || exit 0

if grep -q "#-- daemontools-run begin" /etc/inittab; then
  echo 'Removing SV inittab entry...'
  rm -f /etc/inittab'{new}'
  sed -e '/#-- daemontools-run begin/,/#-- daemontools-run end/d' \
    /etc/inittab > /etc/inittab'{new}'
  mv -f /etc/inittab'{new}' /etc/inittab
  kill -s HUP 1 || :
  echo 'Sending services the TERM and CONT signals...'
  svc -dx /etc/service/* || :
  sleep 5
  echo 'Sending log services the TERM and CONT signals...'
  svc -dx /etc/service/*/log || :
fi

# systemd service
test ! -d /run/systemd/system ||
  ! systemctl is-active daemontools.service >/dev/null ||
    systemctl stop daemontools.service
rm -f /etc/systemd/system/multi-user.target.wants/daemontools.service