Skip to content

Instantly share code, notes, and snippets.

@eherot
Created March 31, 2014 21:27
Show Gist options
  • Save eherot/9902769 to your computer and use it in GitHub Desktop.
Save eherot/9902769 to your computer and use it in GitHub Desktop.
Using socat as a listener for a socket file
socat_start() {
start-stop-daemon --quiet --start \
--pidfile "$SOCAT_PIDFILE" \
--background --make-pidfile \
--exec $SOCAT_DAEMON tcp-listen:$SOCAT_TCP_PORT,fork UNIX-CLIENT:$SOCAT_SOCK < /dev/null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment