/[adm]/puppet/modules/planet/templates/deploy_new-planet.sh
ViewVC logotype

Contents of /puppet/modules/planet/templates/deploy_new-planet.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1116 - (show annotations) (download) (as text)
Thu Feb 17 14:38:55 2011 UTC (13 years, 2 months ago) by dams
File MIME type: application/x-sh
File size: 996 byte(s)
fix typo
1 #!/bin/sh
2
3 # Initialization
4 PATH_TO_FILE=${PATH_TO_FILE:-/var/lib/planet}
5 PATH_TO_PLANET=${PATH_TO_PLANET:-/var/www/html/planet.<%= domain %>}
6
7 #Ask for new locale name
8 echo -n "Locale name: "
9 read locale
10
11 # Display the answer and ask for confirmation
12 echo -e -n "Do you confirm the entry: \"$locale\"? (y/n) "
13 read answer
14 if [ "$answer" == "y" ]
15 then
16 FILE="$PATH_TO_PLANET/$locale/"
17 if test -d $FILE
18 then
19 echo "Aborted, $FILE already exist."
20 exit 2
21 else
22 # Deploy new planet with locale given
23 /bin/mkdir $FILE
24 /bin/chown planet:apache $FILE
25 /usr/bin/wget -O $PATH_TO_FILE"/moonmoon.tar.gz" http://damsweb.net/files/moonmoon_mageia.tar.gz
26 if [ $? -ne 0 ]
27 then
28 echo "Aborted, can't download GZIP file"
29 exit 2
30 fi
31 /bin/tar zxvf $PATH_TO_FILE/moonmoon.tar.gz -C $FILE
32 /bin/chmod g+w $FILE."custom" $FILE."custom/people.opml" $FILE."admin/inc/pwd.inc.php"
33 /bin/mkdir $FILE."cache"
34 /bin/chown g+w $FILE."cache"
35 fi
36 else
37 echo "Aborted, please try again."
38 exit 2
39 fi

Properties

Name Value
svn:eol-style native
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30