Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1726
Phabricator upgrade script
Active
Public
Actions
Authored by
cspeckmim
on Feb 19 2015, 7:28 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F309914: Phabricator_upgrade_script
Feb 19 2015, 7:28 PM
2015-02-19 19:28:01 (UTC+0)
Subscribers
None
#!/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
Event Timeline
cspeckmim
edited the content of this paste.
(Show Details)
Feb 19 2015, 7:28 PM
2015-02-19 19:28:01 (UTC+0)
cspeckmim
changed the title of this paste from untitled to
Phabricator upgrade script
.
cspeckmim
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment