Collection of scripts for interfacing with proxmox containers
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.

31 lines
777 B

  1. #!/usr/bin/env bash
  2. ##########################
  3. # Script to install Gogs, a Go based version control system.
  4. ##########################
  5. # Header for this script
  6. TITLE="Gogs_Setup"
  7. LOGFILE=/tmp/$TITLE.log
  8. DEPTH=2
  9. if [[ $DEPTH == 0 ]]; then
  10. TAGSTR="-->"
  11. elif [[ $DEPTH == 1 ]]; then
  12. TAGSTR="--->"
  13. elif [[ $DEPTH == 2 ]]; then
  14. TAGSTR="----->"
  15. elif [[ $DEPTH == 3 ]]; then
  16. TAGSTR="------>"
  17. fi
  18. echo "$TAGSTR ====== $TITLE (Logged to $LOGFILE) ======"
  19. # All we need to do is install gogs and enable it.
  20. # Gogs configuration must be done via command line.
  21. echo "$TAGSTR Installing Gogs"
  22. yaourt -S gogs --noconfirm > $LOGFILE 2>&1
  23. systemctl enable gogs > $LOGFILE 2>&1
  24. systemctl start gogs > $LOGFILE 2>&1
  25. # Lastly, say we are done.
  26. echo "$TAGSTR Completed $TITLE"