Advertisement
chrissharp123

Untitled

Oct 16th, 2017
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. fixup_apache()
  2. {
  3. # stop apache2
  4. echo "csharp: within fixup_apache()"
  5. echo "csharp: `ps aux | grep -v grep | grep apache`"
  6. service apache2 stop
  7. echo "csharp: `ps aux | grep -v grep | grep apache`"
  8. # keep the bad apache modules away --esi
  9. for m in deflate mpm_event; do a2dismod -f $m > /dev/null; done;
  10. for m in expires include proxy proxy_http rewrite ssl xmlent idlchunk mpm_prefork; do a2enmod -f $m > /dev/null; done;
  11. if [ ! -e "/etc/apache2/ssl" ]
  12. then
  13. mkdir /etc/apache2/ssl
  14. pushd /etc/apache2/ssl
  15. openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key -subj "/CN=$HFQDN"
  16. popd
  17. fi
  18. sed -i "s^APACHE_RUN_USER=www-data^APACHE_RUN_USER=opensrf^g" /etc/apache2/envvars
  19. # since we're changing the apache run user, we have to chown this directory
  20. chown opensrf:opensrf /var/lock/apache2
  21. /usr/sbin/a2dissite 000-default > /dev/null
  22. /usr/sbin/a2ensite eg.conf > /dev/null
  23.  
  24. # start apache2
  25. service apache2 start
  26. echo "csharp: `ps aux | grep -v grep | grep apache`"
  27. }
  28.  
  29. fixup_apache
  30. if [ $STANDALONE -eq 1 ]
  31. then
  32. #TODO:take this following line out once it's confirmed it's working without.
  33. #init_db
  34. add_eg_db_user
  35. configure_opensrf_xml
  36. populate_db
  37. fi
  38. echo "csharp: just before fix_openils_perms"
  39. echo "csharp: `ps aux | grep -v grep | grep apache`"
  40. /etc/init.d/opensrf stop
  41. fix_openils_perms
  42. ldconfig
  43. /etc/init.d/opensrf start
  44. echo "csharp: just after ldconfig"
  45. echo "csharp: `ps aux | grep -v grep | grep apache`"
  46. if [ $STANDALONE -eq 1 ]
  47. then
  48. run_autogen
  49. echo
  50. echo "The installation of Evergreen ILS is complete."
  51. printf "To start using Evergreen browse to :- \nhttp://$(hostname -f) \n$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print "http://"$1}')\n"
  52. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement