Skip to content

kurtcms/daemonc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

IP Networking: Execute if Process is Missing

This Bash script may be executed on a terminal or by a task scheduler such as cron and it does the following:

  1. Execute ps to print a snapshot of the current processes;
  2. Match the print with grep to see if the argument supplied is found in the current processes; and
  3. If the argument supplied is not found, execute it.

A detailed walk-through is available here.

Table of Content

Getting Started

Get started in three simple steps:

  1. Download a copy of the script;
  2. Provide the script with execute permission; and
  3. Run the script.

Git Clone

Download a copy of the script with git clone.

$ git clone https://github.com/kurtcms/daemonc /app/daemonc/

Permission

Provide the script with execute permission.

$ chmod +x /app/daemonc/daemonc.sh

Run

Run the script with an executable process and its corresponding argument(s) as arguments(s).

$ /app/daemonc/daemonc.sh iperf -s -D

And have the output of the supplied executable process returned, or have nothing returned if it is found in the current processes.

Running Iperf Server as a daemon

Releases

No releases published

Packages

No packages published

Languages