forked from easesstone/knowledge
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathftp_server_restart.sh
More file actions
1 lines (1 loc) · 916 Bytes
/
ftp_server_restart.sh
File metadata and controls
1 lines (1 loc) · 916 Bytes
1
#!/bin/bashftp_pid=$(jps | grep KafkaOverFtpServer | awk '{print $1}')echo "ftp's pid is: ${ftp_pid}"if [ -n ${ftp_pid} ];then echo "ftp process is exit, first to kill it.then to start ftp." kill -9 ${ftp_pid} sh /opt/RealTimeFace/bin/start-ftpserver.shelse echo "ftp process is not exit, just to start ftp." sh /opt/RealTimeFace/bin/start-ftpserver.shfiftp_pid_restart=$(jps | grep KafkaOverFtpServer | awk '{print $1}')sleep 10secho "starting, please wait........"if [ -z ${ftp_pid_restart} ];then echo "start ftp failed....." sh /opt/RealTimeFace/bin/start-ftpserver.sh ftp_pid_retry=$(jps | grep KafkaOverFtpServer | awk '{print $1}') if [ -z ${ftp_pid_retry} ];then echo "retry start ftp failed, please check the config......" else echo "secondary try start ftp sucess." fielse echo "start ftp sucess."fi