4
4
5
5
PACKAGENAME=builder
6
6
7
- if [[ " $OSTYPE " == " linux-gnu" ]]; then
8
- echo " Configuring environment for Linux"
9
- # Make sure we have up-to-date stuff
10
- sudo apt-get update
11
- if [[ ! $TRAVIS ]]; then
12
- # Ubuntu Server (on AWS?) lacks UTF-8 for some reason. Give it that
13
- sudo locale-gen en_US.UTF-8
14
- sudo apt-get install -y php5-intl
15
- fi
16
- # Install dependencies
17
- sudo apt-get install -y apache2 libapache2-mod-php5 php-pear php5-curl php5-sqlite php5-mysql acl curl git
18
- # Enable Apache configs
19
- sudo a2enmod rewrite
20
- sudo a2enmod alias
21
- # Restart Apache
22
- sudo service apache2 restart
23
- elif [[ " $OSTYPE " == " darwin" * ]]; then
24
- # is there something comparable to this on os x? perhaps Homebrew
25
- echo " Configuring environment for OS X (to be added..)"
7
+ if [[ " $OSTYPE " != " linux-gnu" ]]; then
8
+ echo " Only Linux environment is supported"
26
9
fi
10
+ echo " Configuring environment for Linux"
11
+ # Make sure we have up-to-date stuff
12
+ sudo apt-get update
13
+ if [[ ! $TRAVIS ]]; then
14
+ # Ubuntu Server (on AWS?) lacks UTF-8 for some reason. Give it that
15
+ sudo locale-gen en_US.UTF-8
16
+ sudo apt-get install -y php5-intl
17
+ fi
18
+ # Install dependencies
19
+ sudo apt-get install -y apache2 libapache2-mod-php5 php-pear php5-curl php5-sqlite php5-mysql acl curl git
20
+ # Enable Apache configs
21
+ sudo a2enmod rewrite
22
+ sudo a2enmod alias
23
+ # Restart Apache
24
+ sudo service apache2 restart
25
+
27
26
28
27
if [[ ! $TRAVIS ]]; then
29
28
@@ -47,23 +46,14 @@ cd /opt/codebender/$PACKAGENAME
47
46
rm -rf Symfony/app/cache/*
48
47
rm -rf Symfony/app/logs/*
49
48
50
- if [[ " $OSTYPE " == " linux-gnu" ]]; then
51
-
52
- if [[ ! $TRAVIS ]]; then
53
- # Need to create cache and logs directories, as they do not pre-exist in new deployments
54
- mkdir -p ` pwd` /Symfony/app/cache/
55
- mkdir -p ` pwd` /Symfony/app/logs/
56
-
57
- # Set access control for both apache and current user on cache and logs directories
58
- sudo setfacl -R -m u:www-data:rwX -m u:` whoami` :rwX ` pwd` /Symfony/app/cache ` pwd` /Symfony/app/logs
59
- sudo setfacl -dR -m u:www-data:rwx -m u:` whoami` :rwx ` pwd` /Symfony/app/cache ` pwd` /Symfony/app/logs
60
- fi
61
-
62
- elif [[ " $OSTYPE " == " darwin" * ]]; then
49
+ if [[ ! $TRAVIS ]]; then
50
+ # Need to create cache and logs directories, as they do not pre-exist in new deployments
51
+ mkdir -p ` pwd` /Symfony/app/cache/
52
+ mkdir -p ` pwd` /Symfony/app/logs/
63
53
64
- HTTPDUSER= ` ps aux | grep -E ' [a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx ' | grep -v root | head -1 | cut -d \ -f1 `
65
- sudo chmod +a " $HTTPDUSER allow delete,write,append,file_inherit,directory_inherit " Symfony/app/cache Symfony/app/logs
66
- sudo chmod +a " ` whoami` allow delete,write,append,file_inherit,directory_inherit " Symfony/app/cache Symfony/app/logs
54
+ # Set access control for both apache and current user on cache and logs directories
55
+ sudo setfacl -R -m u:www-data:rwX -m u: ` whoami ` :rwX ` pwd ` / Symfony/app/cache ` pwd ` / Symfony/app/logs
56
+ sudo setfacl -dR -m u:www-data:rwx -m u: ` whoami` :rwx ` pwd ` / Symfony/app/cache ` pwd ` / Symfony/app/logs
67
57
fi
68
58
69
59
cd Symfony
0 commit comments