Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F309914
Phabricator_upgrade_script
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
cspeckmim
Feb 19 2015, 7:28 PM
2015-02-19 19:28:01 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
Phabricator_upgrade_script
View Options
#!/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
Details
Attached
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)
Attached To
Mode
P1726 Phabricator upgrade script
Attached
Detach File
Event Timeline
Log In to Comment