#!/bin/bash set -e case "$1" in configure) # Testing upgrade if [ ! -f /etc/moving-profiles/setup.conf ]; then cp /usr/share/n4d-moving-profiles/setup.conf /etc/moving-profiles/ else # Exists MD5SUMS_WELL_KNOWN="f42d6a30967cad3f924d906fcda86b44 " IS_WELL_KNOWN=0 for MD5SUM in $MD5SUMS_WELL_KNOWN; do AUX_MD5=$(md5sum /etc/moving-profiles/setup.conf| cut -d " " -f1) if [ $AUX_MD5 = $MD5SUM ]; then IS_WELL_KNOWN=1 echo " * [ N4D Moving profiles ] : Found md5sum as in older revision" fi done if [ $IS_WELL_KNOWN -ne 0 ]; then cp /usr/share/n4d-moving-profiles/setup.conf /etc/moving-profiles/ fi fi n4d-modules enable-plugin /etc/n4d/conf.d/MovingProfiles ;; abort-upgrade|abort-deconfigure|abort-remove) ;; *) echo "$0 called with unknown argument \`$1'" 1>&2 exit 1 ;; esac exit 0