Alternc  latest
Alternc logiel libre pour l'hébergement
3.1.0~c.sh
Go to the documentation of this file.
1 #!/bin/bash
2 # Upgrading script to AlternC 3.0.3
3 
4 CONFIG_FILE="/usr/lib/alternc/functions.sh"
5 PATH=/sbin:/bin:/usr/sbin:/usr/bin
6 
7 umask 022
8 
9 if [ ! -r "$CONFIG_FILE" ]; then
10  echo "Can't access $CONFIG_FILE."
11  exit 1
12 fi
13 
14 if [ `id -u` -ne 0 ]; then
15  echo "$0 must be launched as root"
16  exit 1
17 fi
18 
19 . "$CONFIG_FILE"
20 
21 
22 #### Migrate zone file of AlternC 1.0 from old directory
23 
24 # If no old directory, nothing to do here
25 test -d /var/alternc/bind/zones/ || exit 0
26 
27 # Copy file but do not overwrite them
28 cp --no-clobber /var/alternc/bind/zones/* /var/lib/alternc/bind/zones/
29 
30 # No need to regenerate zone, we are launched by upgrade_check,
31 # launched by alternc.install, and alternc.install regenerate everything
32 # when it end