Hello. I have a process, that i want to restart if he dies. Process name is black.x86 Directory - /tmp/blackplanet/black.x86 System - CentOS 6.4 Can someone help with correct .sh script? Thanks! PS. Yeah yeah i googled alot, but nothing helped me =(
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
put this on cron
<br>if [ ! /usr/bin/pgrep black.x86 ];then /tmp/blackplanet/black.x86 & ;fi
I wrote this script like this
<br># !/bin/bash
<br>
<br>if [ ! /usr/bin/pgrep murmur.x86 ];
<br>then /tmp/murmur/murmur.x86 &;
<br>fi
<br>Saved as watchdogblack.sh.
<br>When i try to execute it error message appears:
<br>
<br>watchdogblack.sh: line 4: syntax error near unexpected token ;' <br>watchdogblack.sh: line 4: then /tmp/murmur/black.x86 & ;
<br>
dont break the lines
<br>
<br>[code]
<br>#!/bin.bash
<br>if [ ! /usr/bin/pgrep black.x86 ];then /tmp/blackplanet/black.x86 & ;fi
<br>[/code]
<br>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.