author | ymh <ymh.work@gmail.com> |
Thu, 10 Nov 2016 14:07:38 +0100 | |
changeset 411 | 49f4705d7b65 |
parent 410 | 240ca282331d |
child 412 | c88746153ee0 |
permissions | -rw-r--r-- |
28 | 1 |
#!/usr/bin/env sh |
2 |
||
410 | 3 |
if [ -x /usr/local/bin/drush ]; then |
4 |
echo "Reactivate corpus module" |
|
5 |
/usr/local/bin/drush -r /var/www/corpusdelaparole/drupal pm-enable -y corpus |
|
6 |
echo "Clear drupal cache" |
|
7 |
/usr/local/bin/drush -r /var/www/corpusdelaparole/drupal cc all |
|
8 |
fi |
|
9 |
||
10 |
||
380
b4f69e646e44
add artisan action after upgrade, correct provisioning
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
11 |
if [ -d /var/www/corpusdelaparole/corpus-back/ ]; then |
410 | 12 |
pushd /var/www/corpusdelaparole/corpus-back/ > /dev/null |
380
b4f69e646e44
add artisan action after upgrade, correct provisioning
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
13 |
|
b4f69e646e44
add artisan action after upgrade, correct provisioning
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
14 |
echo "Correcting file permissions for back office" |
b4f69e646e44
add artisan action after upgrade, correct provisioning
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
15 |
chgrp -R apache storage bootstrap/cache |
b4f69e646e44
add artisan action after upgrade, correct provisioning
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
16 |
chmod -R ug+rwx storage bootstrap/cache |
b4f69e646e44
add artisan action after upgrade, correct provisioning
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
17 |
|
410 | 18 |
echo "Migrating back office database" |
19 |
php artisan migrate -n --force |
|
20 |
||
21 |
echo "Optimizing framework" |
|
22 |
php artisan optimize |
|
23 |
php artisan config:cache |
|
24 |
php artisan route:cache |
|
25 |
||
26 |
echo "Correcting file permissions for back office" |
|
27 |
chgrp -R apache storage bootstrap/cache |
|
28 |
chmod -R ug+rwx storage bootstrap/cache |
|
29 |
||
30 |
echo "Put back application in production" |
|
31 |
php artisan up |
|
32 |
||
33 |
popd > /dev/null |
|
380
b4f69e646e44
add artisan action after upgrade, correct provisioning
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
34 |
fi |
b4f69e646e44
add artisan action after upgrade, correct provisioning
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
35 |
|
b4f69e646e44
add artisan action after upgrade, correct provisioning
ymh <ymh.work@gmail.com>
parents:
346
diff
changeset
|
36 |
|
346
4cd0f8c936ed
upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
28
diff
changeset
|
37 |
echo "Restart httpd" |
28 | 38 |
/usr/bin/systemctl restart httpd |