2011-06-30 04:45:12 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2021-09-04 21:48:31 +02:00
|
|
|
# This is an example script for updating Phabricator. 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.
|
2011-06-30 04:45:12 +02:00
|
|
|
|
|
|
|
# NOTE: This script assumes you are running it from a directory which contains
|
2021-09-04 21:48:31 +02:00
|
|
|
# arcanist/ and phorge/. If you named them differently, you can change them
|
|
|
|
# here:
|
|
|
|
NAME_MAIN="phorge"
|
|
|
|
NAME_ARC="arcanist"
|
|
|
|
|
2011-06-30 04:45:12 +02:00
|
|
|
|
|
|
|
ROOT=`pwd` # You can hard-code the path here instead.
|
|
|
|
|
|
|
|
### UPDATE WORKING COPIES ######################################################
|
|
|
|
|
2021-09-04 21:48:31 +02:00
|
|
|
cd $ROOT/$NAME_ARC
|
2012-01-16 20:35:22 +01:00
|
|
|
git pull
|
2011-10-20 03:26:21 +02:00
|
|
|
|
2021-09-04 21:48:31 +02:00
|
|
|
cd $ROOT/$NAME_MAIN
|
2012-01-16 20:35:22 +01:00
|
|
|
git pull
|
2011-10-20 03:26:21 +02:00
|
|
|
|
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
### CYCLE WEB SERVER AND DAEMONS ###############################################
|
2011-06-30 04:45:12 +02:00
|
|
|
|
2012-01-16 20:35:22 +01:00
|
|
|
# Stop daemons.
|
2021-09-04 21:48:31 +02:00
|
|
|
$ROOT/$NAME_MAIN/bin/phd stop
|
2012-01-16 20:35:22 +01:00
|
|
|
|
2014-06-05 21:40:53 +02:00
|
|
|
# If running the notification server, stop it.
|
2021-09-04 21:48:31 +02:00
|
|
|
# $ROOT/$NAME_MAIN/bin/aphlict stop
|
2014-06-05 21:40:53 +02:00
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
# 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.
|
2013-12-31 01:47:05 +01:00
|
|
|
# NOTE: If you're running php-fpm, you should stop it here too.
|
|
|
|
|
2011-06-30 04:45:12 +02:00
|
|
|
sudo /etc/init.d/httpd stop
|
|
|
|
|
2013-12-31 01:47:05 +01:00
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
# Upgrade the database schema. You may want to add the "--force" flag to allow
|
|
|
|
# this script to run noninteractively.
|
2021-09-04 21:48:31 +02:00
|
|
|
$ROOT/$NAME_MAIN/bin/storage upgrade
|
2011-06-30 04:45:12 +02:00
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
# Restart the webserver. As above, this depends on your system and webserver.
|
2013-12-31 01:47:05 +01:00
|
|
|
# NOTE: If you're running php-fpm, restart it here too.
|
2011-06-30 04:45:12 +02:00
|
|
|
sudo /etc/init.d/httpd start
|
|
|
|
|
2013-02-14 16:22:43 +01:00
|
|
|
# Restart daemons.
|
2021-09-04 21:48:31 +02:00
|
|
|
$ROOT/$NAME_MAIN/bin/phd start
|
2014-06-05 21:40:53 +02:00
|
|
|
|
|
|
|
# If running the notification server, start it.
|
2021-09-04 21:48:31 +02:00
|
|
|
# $ROOT/$NAME_MAIN/bin/aphlict start
|