Page MenuHomePhabricator

phabricator script
ArchivedPublic

Authored by pmoreau on Jan 28 2016, 8:38 PM.
#!/bin/zsh
#
# $1: action "stop", "start", "restart"
action=${1}
PHAB_ROOT_FOLDER=/srv/http
if [[ ${action} == 'upgrade' ]]
then
echo 'Stopping Phabricator'
phabricator stop
if [[ "${2}" == 'true' ]]
then
echo 'Restarting MySQL'
systemctl restart mysqld
fi
cd ${PHAB_ROOT_FOLDER}/arcanist && git pull
cd ${PHAB_ROOT_FOLDER}/libphutil && git pull
cd ${PHAB_ROOT_FOLDER}/phabricator && git pull
${PHAB_ROOT_FOLDER}/phabricator/bin/storage upgrade
echo 'Restarting Phabricator'
phabricator start
else
systemctl $1 phabricator-phd
systemctl $1 phabricator-aphlict
systemctl $1 phabricator-sshd
systemctl $1 php-fpm
systemctl $1 nginx
fi

Event Timeline

pmoreau created this object with visibility "Public (No Login Required)".
pmoreau created this object with edit policy "Restricted Project (Project)".