SHARE
TWEET

My Pastey

a guest Jan 27th, 2020 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #### Start script to automate building of Ubuntu mirror #####
  2. ## THE NEXT LINE IS NEEDED THE REST OF THE LINES STARTING WITH A # CAN BE DELETED
  3.  
  4. #!/bin/bash
  5.  
  6. ## Setting variables with explanations.
  7.  
  8. #
  9. # Don't touch the user's keyring, have our own instead
  10. #
  11. export GNUPGHOME=/home/mirrorkeyring
  12.  
  13. # Arch=         -a      # Architecture. For Ubuntu can be i386, powerpc or amd64.
  14. # sparc, only starts in dapper, it is only the later models of sparc.
  15. #
  16. arch=i386,amd64
  17.  
  18. # Minimum Ubuntu system requires main, restricted
  19. # Section=      -s      # Section (One of the following - main/restricted/universe/multiverse).
  20. # You can add extra file with $Section/debian-installer. ex: main/debian-installer,universe/debian-installer,multiverse/debian-installer,restricted/debian-installer
  21. #
  22. section=main,restricted,universe,multiverse
  23.  
  24. # Release=      -d      # Release of the system (...Hardy, Intrepid... Lucid, Precise, Quantal, Saucy, Trusty ), and the -updates and -security ( -backports can be added if desired)
  25. # List of updated releases in: https://wiki.ubuntu.com/Releases
  26. #
  27.  
  28. release=trusty,trusty-security,trusty-updates
  29.  
  30. # Server=       -h      # Server name, minus the protocol and the path at the end
  31. # CHANGE "*" to equal the mirror you want to create your mirror from. au. in Australia  ca. in Canada.
  32. # This can be found in your own /etc/apt/sources.list file, assuming you have Ubuntu installed.
  33. #
  34. server=archive.ubuntu.com
  35.  
  36. # Dir=          -r      # Path from the main server, so http://my.web.server/$dir, Server dependant
  37. #
  38. inPath=/ubuntu
  39.  
  40. # Proto=        --method=       # Protocol to use for transfer (http, ftp, hftp, rsync)
  41. # Choose one - http is most usual the service, and the service must be available on the server you point at.
  42. #
  43. proto=http
  44.  
  45. # Outpath=              # Directory to store the mirror in
  46. # Make this a full path to where you want to mirror the material.
  47. #
  48. outPath=/home/UbuntuMirror
  49.  
  50. # The --nosource option only downloads debs and not deb-src's
  51. # The --progress option shows files as they are downloaded
  52. # --source \ in the place of --no-source \ if you want sources also.
  53. # --nocleanup  Do not clean up the local mirror after mirroring is complete. Use this option to keep older repository
  54. # Start script
  55. #
  56. debmirror       -a $arch \
  57.                 --no-source \
  58.                 -s $section \
  59.                 -h $server \
  60.                 -d $release \
  61.                 -r $inPath \
  62.                 --progress \
  63.                 --method=$proto \
  64.                 $outPath
  65.  
  66.  
  67. #### End script to automate building of Ubuntu mirror ####
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top