Topic on Extension talk:Collection

Script to start local render server

1
Ibutakov.smartec (talkcontribs)

maybe it will be helpful for someone.

#!/bin/sh
#
#chkconfig: 345 20 80
#
#description: mw-serve

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin

case "$1" in
    start)
        setuid www-data mw-qserve &
        setuid www-data nserve &
        setuid www-data nslave --cachedir /tmp/mwcache/ &
        setuid www-data postman &
    ;;
  stop)
        killall nserve
        killall mw-qserve
        killall nslave
        killall postman
    ;;
  force-reload|restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: /etc/init.d/mw-serve {start|stop}"
    exit 1
    ;;
esac

exit 0

added command to crontab to start/restart it automatically:

crontab -e
@reboot /path/to/file start
@daily /path/to/file restart
Reply to "Script to start local render server"