Skip to content

Instantly share code, notes, and snippets.

@voidman
Last active August 29, 2015 14:11
Show Gist options
  • Save voidman/efaff631760835db2132 to your computer and use it in GitHub Desktop.
Save voidman/efaff631760835db2132 to your computer and use it in GitHub Desktop.
Restart supervisor job
function jobrestart()
{
if [ "$1" = "" ]; then
echo "请输入任务名称"
return
fi
sudo supervisorctl -c /data/code/supervisord.conf status | grep $1 | awk '{print $1 }' | xargs sudo supervisorctl -c /data/code/supervisord.conf restart
}
用法:
jobrestart your_job_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment