CasperCheck cURL issue

danshaw
Contributor II

After hours of trying to figure this out I am hoping someone can help shed some light on why I cannot get CasperCheck from @rtrouton to download the QuickAdd Package. I've seen some other discussions on this, but none of the "solutions" have worked.

After multiple tries I have narrowed it down to what I think is the cURL command. I keep getting the error:

End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /tmp/quickadd.zip or
        /tmp/quickadd.zip.zip, and cannot find /tmp/quickadd.zip.ZIP, period.

I have tried multiple web servers (even box.com with a public url) and keep getting the same exact message. Currently this is on a 10.10 box, but also have tried it on 10.11. I am using the latest script found on github. If I manually put the QuickAdd package in the /tmp folder it works fine.

The console log spits out:

2016-04-12 13:35:43  Downloaded zip file appears to be corrupted. Exiting CasperCheck.

I wont paste the entire script, but here is the important part:

#!/bin/bash

#
# User-editable variables
#

# For the fileURL variable, put the complete address 
# of the zipped Casper QuickAdd installer package

fileURL="https://my.jss.com/CasperShare/Packages/QuickAdd.pkg.zip"

# For the jss_server_address variable, put the complete 
# fully qualified domain name address of your Casper server

jss_server_address="my.jss.com"

# For the jss_server_address variable, put the port number 
# of your Casper server. This is usually 8443; change as
# appropriate.

jss_server_port="8443"

# For the log_location variable, put the preferred 
# location of the log file for this script. If you 
# don't have a preference, using the default setting
# should be fine.

log_location="/var/log/caspercheck.log"

#
# The variables below this line should not need to be edited.
# Use caution if doing so. 
#

quickadd_dir="/var/root/quickadd"
quickadd_zip="/tmp/quickadd.zip"
quickadd_installer="$quickadd_dir/casper.pkg"
quickadd_timestamp="$quickadd_dir/quickadd_timestamp"

I've also tried compressing the pkg on several computers with all the same issue.

1 REPLY 1

danshaw
Contributor II

Well looks like I figured it out! We use authentication for downloads and I needed to use our credentials to get it working. This post helped:

https://jamfnation.jamfsoftware.com/discussion.html?id=15322#responseChild95563