Browse files

added logic to the top to NOT RUN if there is no lipsyncd running. This

should solve the phantom files disappearing on the client.
  • Loading branch information...
1 parent 08319c5 commit 296f9602680899584de510ac9e3377f1b4c50610 @philcryer committed Jun 21, 2011
Showing with 11 additions and 1 deletion.
  1. +11 −1 bin/lipsync
View
12 bin/lipsync
@@ -6,10 +6,20 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
CONF_FILE=/etc/lipsyncd
+###############
+# DO NOT RUN if lipsyncd isn't running
+###############
+eval LIPSYNCD_PROCESS=`ps aux | grep lipsyncd.pid | grep -cv grep`
+if [ $LIPSYNCD_PROCESS -eq 0 ]; then
+ exit 0
+fi
+
+###############
+# source config, define logfile
+###############
if [ -e $CONF_FILE ]; then
. $CONF_FILE
fi
-
LOG_FILE="/home/$USER_NAME/.lipsyncd/lipsyncd.log"
###############

0 comments on commit 296f960

Please sign in to comment.