File: postinst

package info (click to toggle)
groundcontrol 1.6.6-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,296 kB
  • ctags: 670
  • sloc: python: 3,486; sh: 26; makefile: 11
file content (24 lines) | stat: -rwxr-xr-x 777 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
#!/bin/bash
set -e

UPDATENOTIFIERDIR=/var/lib/update-notifier/user.d

echo "Please restart all running instances of Nautilus, or you will experience problems. i.e. nautilus --quit"

if [ -d $UPDATENOTIFIERDIR ] ; then
  # pgrep matches application names from /proc/<pid>/status which is
  # truncated according to sys/procfs.h definition. Problem is it's
  # platform dependent. Either 15 or 16 chars.
  if [ `pgrep -x -c nautilus` -ne 0 ];  then
    cp -f /usr/share/groundcontrol/groundcontrol-restart-required.update-notifier \
        $UPDATENOTIFIERDIR/groundcontrol-restart-required
        # sometimes this doesn't happen:
    touch /var/lib/update-notifier/dpkg-run-stamp
  else
    rm -f $UPDATENOTIFIERDIR/groundcontrol-restart-required
  fi
fi

#DEBHELPER#

exit 0