timezone.sh
1 |
#!/bin/bash |
---|---|
2 |
######################### |
3 |
# Modification timezone |
4 |
######################### |
5 |
rep_conf="/usr/share/zoneinfo" |
6 |
echo -n "Modification du fuseau horaire? y/n " |
7 |
read entree |
8 |
if [ "$entree" = "y" ] || [ "$entree" = "Y" ] |
9 |
then |
10 |
echo "Tapez 1 pour Iles de la Societe" |
11 |
echo "Tapez 2 pour les Marquises" |
12 |
echo "Tapez 3 pour Gambier" |
13 |
echo -n "Choix: " |
14 |
read choix |
15 |
case "$choix" in |
16 |
1) |
17 |
cp $rep_conf/Pacific/Tahiti /etc/localtime |
18 |
chmod 644 /etc/localtime |
19 |
echo "Pacific/Tahiti" > /etc/timezone |
20 |
;; |
21 |
2) |
22 |
cp $rep_conf/Pacific/Marquesas /etc/localtime |
23 |
chmod 644 /etc/localtime |
24 |
echo "Pacific/Marquesas" > /etc/timezone |
25 |
;; |
26 |
3) |
27 |
cp $rep_conf/Pacific//Gambier /etc/localtime |
28 |
chmod 644 /etc/localtime |
29 |
echo "Pacific/Gambier" > /etc/timezone |
30 |
;; |
31 |
*) |
32 |
echo "Pas de choix" |
33 |
;; |
34 |
esac |
35 |
fi |