Open_file.sh:
Run liferay, jira, confluence, bamboo, and fisheye in sequence. You can run liferay, jira, confluence, bamboo, and fisheye individually to check whether a program has been run.
#! /Bin/sh
# Openfile: liferay, jira, confluence, bamboo, fisheye
# Portrunning
Port_l = 'netstat-an | grepLISTEN | grep: 8080'
Port_j = 'netstat-an | grepLISTEN | grep: 8080'
Port_c = 'netstat-an | grepLISTEN | grep: 8080'
Port_ B = 'netstat-an | grepLISTEN | grep: 8080'
Port_f = 'netstat-an | grepLISTEN | grep: 8080'
# Openliferay
Cd, usr, local, atlassian, liferay, tomcat-7.0.27, and bin
If ["$ port_l "! = ""]; Then
Echo "======================== liferayisruning! ========================"
Else
If [$ (whoami) = "root"]; then
Shstartup. sh
Else
Echo "w4u.com. au" | sudoshstartup. sh
Fi
Wait
Port_ll = 'netstat-an | grepLISTEN | grep: 8080'
If ["$ port_ll" = ""]; then
Echo "======================== liferayrunfailed! Exitopenfile =========================="
Echo "====================== jira, confluence, bamboo, fisheyenostart! ========================"
Exit
Fi
Fi
# Openjira
Cd/usr/local/atlassian/jira/bin
If ["$ port_j "! = ""]; Then
Echo "======================== jiraisruning! ======================"
Else
If [$ (whoami) = "root"]; then
Rm-rf/var/atlassian/application-data/jira/plugins/. osgi-plugins/felix-cache
Echo "======================== cleanjiracachecomplete! ======================"
Rm/var/atlassian/APP-data/jira/. jira-home.lock
Shstart-jira.sh
Else
Echo "w4u.com. au" | sudoshstart-jira.sh
Fi
Wait
Port_jj = 'netstat-an | grepLISTEN | grep: 8080'
If ["$ port_jj" = ""]; then
Echo "========================= jirarunfailed! Exitopenfile =========================="
Echo "====================== confluence, bamboo, fisheyenostart! ========================"
Exit
Fi
Fi
# Openconfluence
Cd/usr/local/atlassian/confluence/bin
If ["$ port_c "! = ""]; Then
Echo "======================== confluenceisruning! ======================"
Else
If [$ (whoami) = "root"]; then
Shstartup. sh
Else
Echo "w4u.com. au" | sudoshstartup. sh
Fi
Wait
Port_cc = 'netstat-an | grepLISTEN | grep: 8080'
If ["$ port_cc" = ""]; then
Echo "======================= confluencerunfailed! Exitopenfile =========================="
Echo "======================== bamboo, fisheyenostart! ========================"
Exit
Fi
Fi
# Openbamboo
Cd/usr/local/atlassian/bamboo
If ["$ port_ B "! = ""]; Then
Echo "========================= bambooisruning! ======================"
Else
If [$ (whoami) = "root"]; then
Shbamboo. shstart
Else
Echo "w4u.com. au" | sudoshbamboo. shstart
Fi
Wait
Port_bb = 'netstat-an | grepLISTEN | grep: 8080'
If ["$ port_bb" = ""]; then
Echo "========================= bamboorunfailed! Exitopenfile =========================="
Echo "======================== fisheyenostart! ========================"
Exit
Fi
Fi
# Openfisheye
Cd/usr/local/atlassian/fecru/bin
If ["$ port_f "! = ""]; Then
Echo "======================== fisheyeisruning! ======================"
Else
If [$ (whoami) = "root"]; then
Shstart. sh
Else
Echo "w4u.com. au" | sudoshstart. sh
Fi
Wait
Port_ff = 'netstat-an | grepLISTEN | grep: 8080'
If ["$ port_ff" = ""]; then
Echo "======================== fisheyerunfailed! Exitopenfile =========================="
Exit
Fi
Fi