Created
December 29, 2014 10:41
-
-
Save milosdjakonovic/d4727b05430ef4043200 to your computer and use it in GitHub Desktop.
Based on detected status of ProFTPD service, start undesirably stopped ProFTPD service. Intended to run AFTER cron.daily and to be workaround until Debian bug #675081 is resolved.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RESULT="$(ps -A | grep proftpd)" | |
if $( echo $RESULT | grep --quiet 'proftpd' ) | |
then | |
echo 'Service PROFTPD is fine, no need for action...' | |
else | |
service proftpd stop | |
service proftpd start | |
echo 'Service PROFTPD was dead, hopefully alive now.' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment