Update of /cvsroot/freevo/freevo
In directory sc8-pr-cvs1:/tmp/cvs-serv3128

Modified Files:
        freevo 
Log Message:
support for start-stop helper scripts

Index: freevo
===================================================================
RCS file: /cvsroot/freevo/freevo/freevo,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** freevo      30 Aug 2003 09:22:36 -0000      1.74
--- freevo      31 Aug 2003 09:17:25 -0000      1.75
***************
*** 12,15 ****
--- 12,18 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.75  2003/08/31 09:17:25  dischi
+ # support for start-stop helper scripts
+ #
  # Revision 1.74  2003/08/30 09:22:36  dischi
  # Removed -OO for Gentoo. Other distros may need this, too. I also had some
***************
*** 113,116 ****
--- 116,127 ----
  
  
+ # get the directory name where to store the pid of the running
+ # Freevo process
+ if [ -w /var/run ] ; then
+     PID_DIR=/var/run
+ else
+     PID_DIR=/tmp
+ fi
+ 
  # option to call a helper script
  # Either this script is called with the name of the helper (as $0) or
***************
*** 118,121 ****
--- 129,133 ----
  # (with runapp if present)
  if [ `basename $0` = "freevo" ]; then
+     name=$1
      script="$FREEVO_HELPERS/$1.py"
      if [ -e "$script" ]; then
***************
*** 123,143 ****
      fi
  else
      script="$FREEVO_HELPERS/$0.py"
  fi
  
  if [ -e "$script" ]; then
!     $RUNAPP python "$script" "$@"
      exit 0
  fi
  
- 
- 
- # get the directory name where to store the pid of the running
- # Freevo process
- if [ -w /var/run ] ; then
-     PID_DIR=/var/run
- else
-     PID_DIR=/tmp
- fi
  
  # Help
--- 135,161 ----
      fi
  else
+     name=$0
      script="$FREEVO_HELPERS/$0.py"
  fi
  
  if [ -e "$script" ]; then
!     PID_FILE="$PID_DIR/freevo-$name.pid"
!     if [ "$1" = "start" ]; then
!       $RUNAPP python "$script" &
!       echo $! > $PID_FILE
!       disown
!     elif [ "$1" = "stop" ]; then
!       if [ -e $PIDFILE ]; then
!           kill -KILL `cat $PID_FILE` > /dev/null 2>&1
!           rm $PID_FILE > /dev/null 2>&1
!       else
!           echo $name not running
!       fi
!     else
!       $RUNAPP python "$script" "$@"
!     fi
      exit 0
  fi
  
  
  # Help




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to