Created
November 2, 2019 18:54
-
-
Save h4rm0n1c/c82c639a76bd6ba7a45e7084220e1d1f to your computer and use it in GitHub Desktop.
Apple Software Update Server - Hosting older and newer updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apple Software Update Server - Hosting older and newer updates | |
Tested on Sierra Server, 10.12.6 | |
sudo chflags nouchg /Library/Server/Software\ Update/Config/swupd.conf | |
sudo nano /Library/Server/Software\ Update/Config/swupd.conf | |
Modify Rewrite rules near bottom of file to look like this: | |
RewriteCond %{HTTP_USER_AGENT} Darwin/8 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/9 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-leopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/10 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-leopard-snowleopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/11 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-lion-snowleopard-leopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/12 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/13 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/14 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/15 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/16 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/17 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/18 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog | |
RewriteCond %{HTTP_USER_AGENT} Darwin/19 | |
RewriteRule ^/index\.sucatalog$ http://%{HTTP_HOST}/cgi-bin/SoftwareUpdateServerGetCatalog?/index-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog | |
sudo chflags uchg /Library/Server/Software\ Update/Config/swupd.conf | |
sudo chflags nouchg /Library/Server/Software\ Update/Config/swupd.plist | |
sudo nano /Library/Server/Software\ Update/Config/swupd.plist | |
Modify othercatalogs section to look like this: | |
<string>index-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog</string> | |
<string>index-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog</string> | |
<string>index-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog</string> | |
<string>index-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog</string> | |
<string>index-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog</string> | |
<string>index-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog</string> | |
<string>index-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog</string> | |
<string>index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog</string> | |
<string>index-lion-snowleopard-leopard.merged-1.sucatalog</string> | |
<string>index-leopard-snowleopard.merged-1.sucatalog</string> | |
<string>leopard.merged-1.sucatalog</string> | |
<string>index.sucatalog</string> | |
sudo chflags uchg /Library/Server/Software\ Update/Config/swupd.plist | |
If you do not set uchg flags on files, server app will change them back to apple's defaults. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment