Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/scripts/install/update_phabricator.sh
12241 views
1
#!/bin/sh
2
3
set -e
4
set -x
5
6
# This is an example script for updating Phabricator, similar to the one used to
7
# update <https://secure.phabricator.com/>. It might not work perfectly on your
8
# system, but hopefully it should be easy to adapt. This script is not intended
9
# to work without modifications.
10
11
# NOTE: This script assumes you are running it from a directory which contains
12
# arcanist/ and phabricator/.
13
14
ROOT=`pwd` # You can hard-code the path here instead.
15
16
### UPDATE WORKING COPIES ######################################################
17
18
cd $ROOT/arcanist
19
git pull
20
21
cd $ROOT/phabricator
22
git pull
23
24
25
### CYCLE WEB SERVER AND DAEMONS ###############################################
26
27
# Stop daemons.
28
$ROOT/phabricator/bin/phd stop
29
30
# If running the notification server, stop it.
31
# $ROOT/phabricator/bin/aphlict stop
32
33
# Stop the webserver (apache, nginx, lighttpd, etc). This command will differ
34
# depending on which system and webserver you are running: replace it with an
35
# appropriate command for your system.
36
# NOTE: If you're running php-fpm, you should stop it here too.
37
38
sudo /etc/init.d/httpd stop
39
40
41
# Upgrade the database schema. You may want to add the "--force" flag to allow
42
# this script to run noninteractively.
43
$ROOT/phabricator/bin/storage upgrade
44
45
# Restart the webserver. As above, this depends on your system and webserver.
46
# NOTE: If you're running php-fpm, restart it here too.
47
sudo /etc/init.d/httpd start
48
49
# Restart daemons.
50
$ROOT/phabricator/bin/phd start
51
52
# If running the notification server, start it.
53
# $ROOT/phabricator/bin/aphlict start
54
55