Commit c9f1f77a authored by Fardale's avatar Fardale

add utils/update_phabricator.sh

parent 55f9fd0e
#!/bin/sh
set -e
set -x
# This is an example script for updating Phabricator, similar to the one used to
# update <https://secure.phabricator.com/>. It might not work perfectly on your
# system, but hopefully it should be easy to adapt. This script is not intended
# to work without modifications.
# NOTE: This script assumes you are running it from a directory which contains
# arcanist/, libphutil/, and phabricator/.
ROOT="/var/phabricator" # You can hard-code the path here instead.
### UPDATE WORKING COPIES ######################################################
cd $ROOT/libphutil
sudo -u phabricator git pull
cd $ROOT/arcanist
sudo -u phabricator git pull
cd $ROOT/phabricator
sudo -u phabricator git pull
### CYCLE WEB SERVER AND DAEMONS ###############################################
# Stop daemons.
sudo -u phabricator $ROOT/phabricator/bin/phd stop
# If running the notification server, stop it.
# $ROOT/phabricator/bin/aphlict stop
# Stop the webserver (apache, nginx, lighttpd, etc). This command will differ
# depending on which system and webserver you are running: replace it with an
# appropriate command for your system.
# NOTE: If you're running php-fpm, you should stop it here too.
sudo systemctl stop nginx.service
sudo systemctl stop php7.3-fpm.service
# Upgrade the database schema. You may want to add the "--force" flag to allow
# this script to run noninteractively.
sudo -u phabricator $ROOT/phabricator/bin/storage upgrade
# Restart the webserver. As above, this depends on your system and webserver.
# NOTE: If you're running php-fpm, restart it here too.
sudo systemctl start nginx.service
sudo systemctl start php7.3-fpm.service
# Restart daemons.
$ROOT/phabricator/bin/phd start
# If running the notification server, start it.
# $ROOT/phabricator/bin/aphlict start
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment