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.

40 lines
1.3KB

  1. #!/bin/bash -e
  2. # Create symlinks between application, userdata, and configuration
  3. rm /application/w/LocalSettings.php
  4. ln -sf /configuration/MWSettings.php /application/w/LocalSettings.php
  5. rm /application/forums/Settings.php
  6. ln -sf /configuration/SMFSettings.php /application/forums/Settings.php
  7. rm -rf /application/w/images
  8. ln -sf /userdata/images /application/w/images
  9. rm -rf /application/forums/downloads
  10. ln -sf /userdata/downloads /application/forums/downloads
  11. rm -rf /application/forums/attachments
  12. ln -sf /userdata/attachments /application/forums/attachments
  13. rm -rf /application/forums/profile_pictures
  14. ln -sf /userdata/profile_pictures /application/forums/profile_pictures
  15. rm -rf /application/forums/pm_attachments
  16. ln -sf /userdata/pm_attachments /application/forums/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 /application/w/maintenance
  28. php update.php