source: lliurex-up/trunk/fuentes/debian/postinst @ 3209

Last change on this file since 3209 was 3209, checked in by kbut, 4 years ago

update scripts for install

  • Property svn:executable set to *
File size: 828 bytes
Line 
1#!/bin/bash
2
3set -e
4
5
6#VARS
7SYSTEM_CONFIG_SCRIPT="/usr/bin/update-manager"
8SYSTEM_AUTOSTART_SCRIPT="/usr/bin/update-notifier"
9OUR_AUTOSTART_BINARY="/bin/true"
10OUR_BINARY=/usr/sbin/lliurex-up
11
12OUR_PACKAGE="lliurex-up"
13
14case $1 in
15
16     configure)
17        if dpkg-divert --package lliurex-up --rename --quiet --add --divert ${SYSTEM_CONFIG_SCRIPT}.real ${SYSTEM_CONFIG_SCRIPT} ; then
18                ln -fs ${OUR_BINARY} ${SYSTEM_CONFIG_SCRIPT}
19        else
20                echo "Unable to divert file \"$SYSTEM_CONFIG_SCRIPT\"" >&2
21                fi
22                if dpkg-divert --package lliurex-up --rename --quiet --add --divert ${SYSTEM_AUTOSTART_SCRIPT}.real ${SYSTEM_AUTOSTART_SCRIPT} ; then
23                        ln -fs ${OUR_AUTOSTART_BINARY} ${SYSTEM_AUTOSTART_SCRIPT}
24                else
25                        echo "Unable to divert file \"$SYSTEM_AUTOSTART_SCRIPT\"" >&2
26                fi
27     ;;
28esac
29
30#DEBHELPER#
31exit 0
Note: See TracBrowser for help on using the repository browser.