###--------------------------------------------------
#
# SourceForge & Confluence stop/start instructions:
#
# docs: https://confluence.cornell.edu/display/COLLABTOOLS/Collaboration+Tools+Support+Manual
#
###--------------------------------------------------
###--------------------------------------------------
# Apache stop start
sudo su - -c "service httpd stop"
sudo su - -c "service httpd start"
##--------------------------------------------------
#
# SourceForge PROD 3 parts (sf-standalone, sf-integration , sf-accountrequest
#
# ssh cherry
#
# Shutdown
sudo su - -c "service sf-integration stop"
sudo su - -c "service sf-standalone stop"
sudo su - -c "service sf-accountrequest stop"
# visually verify it comes down gracefully;
#
# ps -ef | grep java to make sure that the SF processes are down; there should be 2 processes still up: Confluence tomcat and our collab-utils tomcat)
#
# Startup:
sudo su - -c "service sf-standalone start"
sudo su - -c "service sf-integration start"
sudo su - -c "service sf-accountrequest start"
# (visually verify it comes up gracefully; this one will take several minutes; it is a foreground process, so don't hit Ctrl-C, just wait)
#
##--------------------------------------------------
##--------------------------------------------------
#
# Confluence PROD (confluence)
sudo su - -c "service confluence stop"
sudo su - -c "service confluence start"
# 1. sudo su - -c "service confluence stop"
# 2. check that confluence has come down: ps -ef | grep confluence should not yield any results
# 3. sudo su - -c "service confluence start"
# 4. check that confluence has come back up: ps -ef | grep confluence should show 1 process
# 5. double check confluence log for any startup errors: less /sf/confluence/confluence_console.log
# 6. make sure everything in /sf_storage/confluence-home is owned by confluence user, not root (this will not be necessary in the near future)