35 lines
586 B
Python
35 lines
586 B
Python
#!/bin/python3
|
|
'''
|
|
Created on Mar 30, 2014
|
|
author: tpweis
|
|
file name: tomcat_start.py
|
|
'''
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
sys.path.insert(0,'/sl/lib')
|
|
|
|
from sleds_utilities import *
|
|
|
|
def main():
|
|
"function main"
|
|
|
|
|
|
slsetvars()
|
|
|
|
scriptname = sltomcatbinget() + "startup.sh"
|
|
p1 = subprocess.Popen([scriptname], stdout=subprocess.PIPE)
|
|
data = p1.communicate()[0]
|
|
data=data.decode()
|
|
data=data.rstrip()
|
|
print(data)
|
|
slscatlog('D',"tomcat_start: " + scriptname)
|
|
|
|
exit()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
# execute only if run as a script
|
|
main()
|
|
|