Eolisation de l'applicatif MSE
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

apacheSync.sh 573B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. [[ $(CreoleGet "is_mse_master" non ) == "non" ]] && exit 0
  3. RSYNC="/usr/bin/rsync"
  4. HOST="${!#}"
  5. HOST=${HOST%:*}
  6. ${RSYNC} "$@"
  7. result=$?
  8. if [ $result -eq 0 ]
  9. then
  10. echo "#### Working on ${HOST}"
  11. cmd=""
  12. # Redémarrage service nginx
  13. # Apache conf
  14. apacheMods="proxy_fcgi rewrite expires"
  15. for mod in ${apacheMods}
  16. do
  17. cmd="${cmd} a2enmod ${mod};"
  18. done
  19. cmd="${cmd} a2ensite mse;"
  20. cmd="${cmd} service php5-fpm restart;"
  21. cmd="${cmd} service apache2 restart;"
  22. ssh ${HOST} "${cmd}"
  23. echo "### Work on ${HOST} DONE"
  24. fi
  25. exit $result