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.

setup.sh 1.2KB

  1. #!/bin/bash -e
  2. # Create symlinks between application, userdata, and configuration
  3. rm $WIKI_SOURCE/LocalSettings.php
  4. ln -sf /configuration/MWSettings.php $WIKI_SOURCE/LocalSettings.php
  5. rm $FORUMS_SOURCE/Settings.php
  6. ln -sf /configuration/SMFSettings.php $FORUMS_SOURCE/Settings.php
  7. rm -rf $WIKI_SOURCE/images
  8. ln -sf /userdata/images $WIKI_SOURCE/images
  9. rm -rf $FORUMS_SOURCE/downloads
  10. ln -sf /userdata/downloads $FORUMS_SOURCE/downloads
  11. rm -rf $FORUMS_SOURCE/attachments
  12. ln -sf /userdata/attachments $FORUMS_SOURCE/attachments
  13. rm -rf $FORUMS_SOURCE/profile_pictures
  14. ln -sf /userdata/profile_pictures $FORUMS_SOURCE/profile_pictures
  15. rm -rf $FORUMS_SOURCE/pm_attachments
  16. ln -sf /userdata/pm_attachments $FORUMS_SOURCE/pm_attachments
  17. # Configure email
  18. cp /configuration/msmtprc /etc/msmtprc
  19. sed -i "s/@GCL_SMTP_HOST@/$GCL_SMTP_HOST/g" /etc/msmtprc
  20. SMTP_PORT=${GCL_SMTP_PORT:-587}
  21. sed -i "s/@GCL_SMTP_PORT@/$SMTP_PORT/g" /etc/msmtprc
  22. SMTP_FROM=${GCL_SMTP_FROM:-no-reply@glitchcity.info}
  23. sed -i "s/@GCL_SMTP_FROM@/$SMTP_FROM/g" /etc/msmtprc
  24. sed -i "s/@GCL_SMTP_USER@/$GCL_SMTP_USER/g" /etc/msmtprc
  25. sed -i "s/@GCL_SMTP_PASSWORD@/$GCL_SMTP_PASSWORD/g" /etc/msmtprc
  26. # Run maintenance scripts
  27. cd $WIKI_SOURCE/maintenance
  28. php update.php
  29. cd $FORUMS_SOURCE
  30. rm install.php
  31. exit 0;