Skip to content

Instantly share code, notes, and snippets.

@rdeavila
Last active August 29, 2015 13:57
Show Gist options
  • Save rdeavila/9788873 to your computer and use it in GitHub Desktop.
Save rdeavila/9788873 to your computer and use it in GitHub Desktop.
Como usar pidof
#!/bin/bash
# Exemplo no terminal
pidof -xs ${1} 1>/dev/null 2>&1 || echo " ==> Script ${1} não está rodando."
# Exemplo no crontab
# 00 18 * * * pidof -x script.sh || script.sh --iniciar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment