all.sh 740 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. startme() {
  3. cd sp-wsgi
  4. if [ ! -f sp_conf.py ] ; then
  5. cp sp_conf.py.example sp_conf.py
  6. fi
  7. if [ ! -f service_conf.py ] ; then
  8. cp service_conf.py.example service_conf.py
  9. fi
  10. ../../tools/make_metadata.py sp_conf > sp.xml
  11. cd ../idp2
  12. if [ ! -f idp_conf.py ] ; then
  13. cp idp_conf.py.example idp_conf.py
  14. fi
  15. ../../tools/make_metadata.py idp_conf > idp.xml
  16. cd ../sp-wsgi
  17. ./sp.py sp_conf &
  18. cd ../idp2
  19. ./idp.py idp_conf &
  20. cd ..
  21. }
  22. stopme() {
  23. pkill -f "sp.py"
  24. pkill -f "idp.py"
  25. }
  26. case "$1" in
  27. start) startme ;;
  28. stop) stopme ;;
  29. restart) stopme; startme ;;
  30. *) echo "usage: $0 start|stop|restart" >&2
  31. exit 1
  32. ;;
  33. esac