[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 #! /bin/bash 2 # $Id: postinst 7197 2012-05-22 00:50:26Z keyser $ 3 # postinst script for smbedu 4 # 5 # see: dh_installdeb(1) 6 7 set -e 8 9 # summary of how this script can be called: 10 # * <postinst> `configure' <most-recently-configured-version> 11 # * <old-postinst> `abort-upgrade' <new version> 12 # * <conflictor's-postinst> `abort-remove' `in-favour' <package> 13 # <new-version> 14 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour' 15 # <failed-install-package> <version> `removing' 16 # <conflicting-package> <version> 17 # for details, see /usr/doc/packaging-manual/ 18 # 19 # quoting from the policy: 20 # Any necessary prompting should almost always be confined to the 21 # post-installation script, and should be protected with a conditional 22 # so that unnecessary prompting doesn't happen if a package's 23 # installation fails and the `postinst' is called with `abort-upgrade', 24 # `abort-remove' or `abort-deconfigure'. 25 case "$1" in 26 configure) 27 echo "Installation de BackupPc en cours......" 28 # Stop BackupPc 29 if [ -e "/var/run/backuppc/BackupPC.pid" ]; then 30 invoke-rc.d backuppc stop 31 fi 32 # degage conf paquet backuppc 33 # voir si on installe sur une ancienne version, deplacer les fichiers existants ??? 34 # 35 /usr/share/se3/scripts/permbackuppc 36 37 # init var mysql connexion, masques et backup 38 . /usr/share/se3/includes/config.inc.sh -cmb 39 40 41 . /usr/share/se3/includes/functions.inc.sh 42 # SETMYSQL \"name\" \"valeur\" \"description\" \"n° categorie\" 43 44 45 if [ -z "$backuppc" ]; then 46 # cas primo installationon vire donc localhost.pl 47 SETMYSQL "backuppc" "1" "Active backuppc de l\'interface" "5" 48 if [ -e /etc/backuppc/localhost.pl ]; then 49 rm -f /etc/backuppc/localhost.pl 50 fi 51 fi 52 53 if [ -z "$bpcmedia" ]; then 54 SETMYSQL "bpcmedia" "0" "Media de sauvegarde pour backuppc" "5" 55 fi 56 57 if [ -z "$bck_user" ]; then 58 SETMYSQL "bck_user" "backuppc" "Utilisateur proprietaire backuppc" "5" 59 fi 60 61 if [ -z "$bck_uidnumber" ]; then 62 uid_backuppc=`getent passwd backuppc | cut -d : -f3` 63 SETMYSQL "bck_uidnumber" "$uid_backuppc" "uidnumber proprietaire backuppc" "5" 64 fi 65 66 # Conf d'apache2se 67 # EN cas de residu de la version Etch 68 if [ -e /etc/apache2se/sites-enabled/backuppc ]; then 69 rm -f /etc/apache2se/sites-enabled/backuppc 70 fi 71 72 usermod -G backuppc -a www-se3 73 74 if [ ! -e /etc/apache2se/sites-enabled/backuppc.conf ]; then 75 ln -s /etc/backuppc/apache2se.conf /etc/apache2se/sites-enabled/backuppc.conf 76 fi 77 78 # On recharge la conf d'apache2se 79 /etc/init.d/apache2se reload 80 81 # Modifie la conf par defaut 82 perl -pi -e "s/Conf{Language} = 'en'/Conf{Language} = 'fr'/" /etc/backuppc/config.pl 83 84 # Ajout dans sudoers 85 ;; 86 87 *) 88 echo "postinst called with unknown argument \`$1'" >&2 89 exit 0 90 ;; 91 esac 92 93 exit 0
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |