Link to home
Start Free TrialLog in
Avatar of jdan
jdan

asked on

cron script needed to restart vsftpd if it is not running

Hi,
Anybody have a script to check that vsftpd is running and start it if it is not?  I need to put such a script in cron to make sure my ftp service is always up (will check every 10 minutes).

Thanks
Avatar of Superdave
Superdave
Flag of United States of America image

ps -a|grep -q vsftpd|vsftpd &

possibly you'll need to include the path of vsftpd and maybe the others if it's run from cron
I meant this, sorry:

ps -a|grep -q vsftpd||vsftpd &
ASKER CERTIFIED SOLUTION
Avatar of ajay_mhasal
ajay_mhasal
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdan
jdan

ASKER

Thanks, that is just what i was looking for.