#!/bin/sh set -e UPDATENOTIFIERDIR=/var/lib/update-notifier/user.d case "$1" in configure) unset DISPLAY # No GUI launched from postinst please caja-dropbox update || true echo "Please restart all running instances of Caja, or you will experience problems. i.e. caja --quit" if [ -d $UPDATENOTIFIERDIR ] ; then # pgrep matches application names from /proc//status which is # truncated according to sys/procfs.h definition. Problem is it's # platform dependent. Either 15 or 16 chars. if pgrep -x caja > /dev/null 2>&1 ; then cat > $UPDATENOTIFIERDIR/dropbox-restart-required < /dev/null Description: Dropbox requires Caja to be restarted to function properly. DROPBOXEND else rm -f $UPDATENOTIFIERDIR/dropbox-restart-required fi fi echo 'Dropbox installation successfully completed! You can start Dropbox from your applications menu.' if [ "$2" = "" ] && [ -d $UPDATENOTIFIERDIR ] ; then cat > $UPDATENOTIFIERDIR/dropbox-start-required < /dev/null Description: Start Dropbox to finish installation. ButtonText: _Start Dropbox DROPBOXEND fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument '$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0