Linux JSS server ... safe place for additional pages

mfcfadmin
Contributor II

I want to place pages of non-private information such as current package versions on our JSS server but somewhere where upgrading JSS doesn't delete them. Is there already such a folder or do I have add something to a configuration file?

9 REPLIES 9

ryan_ball
Valued Contributor

@mfcfadmin I would create a directory under /mnt and store items there. You probably also want to install apache if you want to serve those items over port 80 or 443, otherwise they would only be available via scp or (s)ftp if you set that up.

donmontalvo
Esteemed Contributor III

@mfcfadmin happy holidays!

Question, you mention "pages" and you mention concern over Jamf Pro installer deleting things, but then you also mention PKG version information. Sounds like you're wanting to publish/host a web page listing PKG versions?

Just an idea, we name our PKGs using vendor_application_version.pkg convention, to streamline things, and to avoid confusion, mistakes, and to avoid having to engineer something to tell us something simple.

How did you plan to extract version information from the PKGs?

We run Jamf Pro on several dozen headless RHEL servers, BTW.

--
https://donmontalvo.com

mfcfadmin
Contributor II

I want to curl the information and the web pages that get nuked reside under /usr/local/jss/tomcat/webapps/ROOT.
I have a python script that pulls the version number from the package name e.g. 63.0.3 from Firefox-63.0.3.pkg
and compares that to the version number from the plist on the client machine.
I don't have sufficient experience to know where else on a Linux Tomcat web server that pages can be put that aren't nuked every time I update the JSS.

ryan_ball
Valued Contributor

I would not recommend leveraging tomcat for that. You'll want to use apache/httpd to serve PKGs from the linux box. Using Jamf only documentation, you could follow steps 1 and 2 from the following resource to set up apache:
https://www.jamf.com/jamf-nation/articles/216/using-apache-http-server-to-enable-http-downloads-on-a...

That would serve the directory at http://yourserver.com/CasperShare over port 80.

mfcfadmin
Contributor II

I’m not putting packages but a text file listing the packages.

ryan_ball
Valued Contributor

mfcfadmin
Contributor II

Well that discussion also mentions that upgrading blows away the folder.

donmontalvo
Esteemed Contributor III

Maybe use crontab -e as root to run ls /path/to/CasperShare/Packages/ > /path/to/CasperShare/Support/Packageslist.txt.

Then use a browser or curl to get the content of the file. Since CasperShare is already hosted.

--
https://donmontalvo.com

mfcfadmin
Contributor II

Finally found probably the best answer I'm going to find:

https://www.moreofless.co.uk/static-content-web-pages-images-tomcat-outside-war/

Serving static content (including web pages) from outside of the WAR using Apache Tomcat

Add <Context docBase="/home/stuff" path="/static" />
to /usr/local/jss/tomcat/conf/server.xml

Unfortunately there isn't any docBase in there by default
and it will be blown away but it's one line to fix instead of a directory.

We do have a sample.war and sample directory which are in the same place as the ROOT.war and ROOT directory
so the sample directory might be a safe place. I'll try that first.