Skip to content

Instantly share code, notes, and snippets.

@Kijewski
Created July 4, 2012 20:08
Show Gist options
  • Save Kijewski/3049281 to your computer and use it in GitHub Desktop.
Save Kijewski/3049281 to your computer and use it in GitHub Desktop.
Start a daemon inside a screen
#!/bin/sh
cd $FOLDER
screen -dm -S $NAME -p 0 -s /bin/bash /bin/bash -c "$COMMAND | tee '$LOG_DIR/$(LANG_ALL=C date --rfc-3339=seconds)'.log" < /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment