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