#!/bin/python3 ''' Created on June 24 2016 author: tpweis file name: sleds_haltall.py This functions uses scat recipe scripts to shutdown the sleds server ''' import os import subprocess import sys sys.path.insert(0,'/sl/lib') from sleds_utilities import * from scat_stopmongo import * from scat_stoptomcat import * from scat_stopk2 import * from scat_haltbots import * def main(): "function main" argv = sys.argv[1:] IPADDR, USER, URN, MONGO = slscatargs(argv) rc = scat_stopk2(IPADDR, USER, URN, MONGO) print("k2 stop return: " + str(rc)) rc = scat_stoptomcat(IPADDR, USER, URN, MONGO) print("tomcat stop return: " + str(rc)) rc = scat_stopmongo(IPADDR, USER, URN, MONGO) print("mongo stop return: " + str(rc)) rc = scat_haltbots(IPADDR, USER, URN, MONGO) print("bot halt return: " + str(rc)) exit() if __name__ == '__main__': # execute only if run as a script main()