Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16137

add a daemon script for ezodf

    XMLWordPrintable

Details

    Description

      • makes life easier for admins
      • make it clear xvfb is recommended way to run it

      quick and dirty:

      #!/bin/sh
      #
      # eZOdf conversion daemon init script
      #
      
      case "$1" in
        start)
          echo Starting xvfb...
          export DISPLAY=:1
          /usr/X11R6/bin/Xvfb :1 -screen 0 1024x768x24 -fbdir /usr/src >/var/log/xvfb.log 2>&1 &
          echo Starting ezodf daemon...
          cd /var/www/sharemagazine && php extension/ezodf/scripts/daemon.php >/var/log/ezodf.log 2>&1 &
      	;;
      
        status)
          pid=`ps -ef | fgrep /usr/X11R6/bin/Xvfb | grep -v fgrep | awk -F ' ' '{print $2}'`
          if [ "$pid" != "" ]; then
              echo Xvfb is running \(pid $pid\)...
          fi
          pid=`ps -ef | fgrep extension/ezodf/scripts/daemon.php | grep -v fgrep | awk -F ' ' '{print $2}'`
          if [ "$pid" != "" ]; then
              echo ezodf daemon is running \(pid $pid\)...
          fi
      	;;
      
        stop)
          pid=`ps -ef | fgrep /usr/X11R6/bin/Xvfb | grep -v fgrep | awk -F ' ' '{print $2}'`
          if [ "$pid" != "" ]; then
              kill $pid
          fi
          pid=`ps -ef | fgrep extension/ezodf/scripts/daemon.php | grep -v fgrep | awk -F ' ' '{print $2}'`
          if [ "$pid" != "" ]; then
              kill $pid
          fi
      	;;
      
        *)
      	echo "Usage: $0 {start|stop|status}" >&2
      	exit 1
      	;;
      esac
      
      exit 0
      

      Attachments

        Activity

          People

            unknown unknown
            72f8acac-185f-4a54-9470-a7473f50daab@accounts.ibexa.co Gaetano Giunta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: