source: n4d-moving-profiles/trunk/fuentes/debian/n4d-moving-profiles.postinst @ 712

Last change on this file since 712 was 712, checked in by jrpelegrina, 3 years ago

First release to xenial

File size: 864 bytes
RevLine 
[712]1#!/bin/bash
2
3set -e
4
5
6case "$1" in
7    configure)
8        # Testing upgrade
9       
10        if [ ! -f /etc/moving-profiles/setup.conf ]; then
11                cp /usr/share/n4d-moving-profiles/setup.conf /etc/moving-profiles/
12        else   
13                # Exists
14                MD5SUMS_WELL_KNOWN="f42d6a30967cad3f924d906fcda86b44 "
15               
16                IS_WELL_KNOWN=0
17                for MD5SUM in $MD5SUMS_WELL_KNOWN; do
18                        AUX_MD5=$(md5sum /etc/moving-profiles/setup.conf| cut -d " " -f1)
19                        if [ $AUX_MD5 = $MD5SUM ]; then
20                                IS_WELL_KNOWN=1
21                                echo " * [ N4D Moving profiles ] : Found md5sum as in older revision"
22                        fi
23                done
24
25                if [ $IS_WELL_KNOWN -ne 0 ]; then
26                        cp /usr/share/n4d-moving-profiles/setup.conf /etc/moving-profiles/
27                fi
28        fi
29       
30        n4d-modules enable-plugin /etc/n4d/conf.d/MovingProfiles
31
32       
33
34        ;;
35    abort-upgrade|abort-deconfigure|abort-remove)
36        ;;
37
38    *)
39        echo "$0 called with unknown argument \`$1'" 1>&2
40        exit 1
41        ;;
42esac
43
44
45exit 0
Note: See TracBrowser for help on using the repository browser.