check_proc.py 259 B

1234567891011
  1. #!/usr/local/python3/bin/python3
  2. # -*- coding: utf-8 -*-
  3. import os
  4. process = "/tmp/xh_twapi01.lock"
  5. os.system("ps -ef|grep xh_twapi01|grep -v grep >%s" % process)
  6. if not os.path.getsize(process):
  7. os.system("//home/python3/xh_twapi01/run_gunicorn.sh")