Page MenuHomePhabricator

Phabricator_upgrade_script

Authored By
cspeckmim
Feb 19 2015, 7:28 PM
Size
1 KB
Referenced Files
None
Subscribers
None

Phabricator_upgrade_script

#!/bin/sh
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
set -e
set -x
# set the environment for where the phabricator repos exist (installed)
ROOT=/usr/local/phacility
PHAB_USER=phabricator
PHAB_PHD_USER=phab-phd
### UPDATE WORKING COPIES ######################################################
cd $ROOT/libphutil
sudo -u $PHAB_USER git pull -n
cd $ROOT/arcanist
sudo -u $PHAB_USER git pull -n
cd $ROOT/phabricator
sudo -u $PHAB_USER git pull -n
### CYCLE WEB SERVER AND DAEMONS ###############################################
# daemons (phd), notification service (aphlict), web service (nginx), php cgi/gateway (php-fpm)
systemctl stop sshd-phab.service
sudo -u $PHAB_PHD_USER $ROOT/phabricator/bin/phd stop
sudo -u $PHAB_USER $ROOT/phabricator/bin/aphlict stop
systemctl stop nginx.service
systemctl stop php-fpm.service
# upgrade database
sudo -u $PHAB_USER $ROOT/phabricator/bin/storage upgrade --force
systemctl start php-fpm.service
systemctl start nginx.service
sudo -u $PHAB_PHD_USER $ROOT/phabricator/bin/phd start
sudo -u $PHAB_USER $ROOT/phabricator/bin/aphlict start
systemctl start sshd-phab.service

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/ju/dv/cl6d6k3gssdog35x
Default Alt Text
Phabricator_upgrade_script (1 KB)

Event Timeline