#!/bin/sh pid=$(ps -elf | grep $(pwd) | grep -v grep | awk '{print $4}') if [ "$pid"x != ""x ]; then kill -9 $pid fi nohup python main.py --production &