Update the website automatically
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

20 lignes
424B

  1. #!/bin/bash
  2. GIT_URL=https://git.lain.church/Jellyman-Group/Sern-Site.git
  3. OUTPUT_DIR=~/site
  4. WWW_DIR=/var/www/html/
  5. WWW_DATA_USER=www-data
  6. # remove the old site
  7. rm -rf $OUTPUT_DIR
  8. # clone the new site
  9. git clone $GIT_URL $OUTPUT_DIR
  10. # Remove the README.md from the dir
  11. rm $OUTPUT_DIR/README.md
  12. # Copy data to webdir
  13. sudo cp -r $OUTPUT_DIR/* $WWW_DIR
  14. # Change ownership
  15. sudo chown -R $WWW_DATA_USER:$WWW_DATA_USER $WWW_DIR