index edf307e373202935846a278f47bff367477f5861..8aa3db73fb2be2ce4716e1d26f01a754a77a6501 100644 (file)
triggered)
/usr/sbin/update-gosa
+ exit 0
;;
*)
chown root.$WEBGROUP -R /var/cache/gosa
chmod 770 -R /var/cache/gosa
-update-gosa
+# Activating triggers
+echo DEBUG: triggertest postinst called, $# args: "$@"
+
+if [ "$1" = "configure" ]; then
+ # in the general case, update-foo and update-bar should always be called
+ # when the central package is updated
+ update-gosa
+
+elif [ "$1" = "triggered" ]; then
+ # since the example ships two triggers, we should determine how to act
+ # based on which trigger was activated.
+ for triggername in $2; do
+ echo DEBUG: processing trigger "'$triggername'"
+ case "$triggername" in
+ "/usr/share/gosa")
+ update-gosa
+ ;;
+ *)
+ echo "unhandled/unknown trigger!"
+ exit 1
+ ;;
+ esac
+ done
+fi
+
exit 0