Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

OSREC Technologies osrec

🎯
Focusing
Block or report user

Report or block osrec

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@osrec
osrec / runWatch.sh
Created Aug 6, 2018
Watch a particular directory for changes and kill and restart a process on change
View runWatch.sh
# In the example below, the command we want to run is `php -f "$DIR/../run.php"` - change this on lines 30 and 46
# $DIR is just the directory containing this script file (computed automatically, but you can hardcode it if you want).
# Use $DIR to specify paths relative to the script's path.
# The PROCESS_NAME variable is the name of the process to kill and restart
# You must ensure your process has the same name each time it runs (we use a file at $DIR/../servername to store the name)
# Alternatively, you can hard code the PROCESS_NAME on line 15 if you like
#!/bin/bash
You can’t perform that action at this time.