Advertisement
Emulatorman

distccd-i686

Feb 22nd, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #!/bin/bash
  2. export PATH="/home/andre/packages/i686-unknown-linux-gnu/bin:$PATH"
  3. pushd /home/andre/packages/i686-unknown-linux-gnu/bin
  4. for _bin in i686-*; do
  5. ln -s -v $_bin ${_bin##*gnu-}
  6. done
  7.  
  8. [ -f /etc/conf.d/distccd ] && . /etc/conf.d/distccd
  9.  
  10. . /etc/rc.conf
  11. . /etc/rc.d/functions
  12.  
  13. PID=`pidof -o %PPID /usr/bin/distccd`
  14. case "$1" in
  15. start)
  16. stat_busy "Starting distcc Daemon"
  17. [ -z "$PID" ] && /usr/bin/distccd --daemon ${DISTCC_ARGS}
  18. if [ $? -gt 0 ]; then
  19. stat_fail
  20. else
  21. add_daemon distccd
  22. stat_done
  23. fi
  24. ;;
  25. stop)
  26. stat_busy "Stopping distcc Daemon"
  27. [ ! -z "$PID" ] && kill $PID &> /dev/null
  28. if [ $? -gt 0 ]; then
  29. stat_fail
  30. else
  31. rm_daemon distccd
  32. stat_done
  33. fi
  34. ;;
  35. restart)
  36. $0 stop
  37. sleep 1
  38. $0 start
  39. ;;
  40. *)
  41. echo "usage: $0 {start|stop|restart}"
  42. esac
  43. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement