Posted on 03-21-2017 10:31 AM
I have been having problems getting CasperCheck to work and I was hoping to get another set of eyes. I have gone so far as to go back to scratch and do as little editing as possible to the script.
Everything seems to connect and run as it should, right up until the point of the QuickAdd itself. I was originally hosting the files in a Google Drive. I have since moved them to dropbox. The link itself seems as though everything downloads fine and the QuickAdd launches fine, and I have created whole new QuickAdds. That's where the success ends.
Here are the logs from terminal and console:
105981-tech:~ admin$ sudo sh /Library/Scripts/caspercheck.sh
Connection to xxxxxxx.xx.xxxxxxxx.org port 8443 [tcp/pcsync-https] succeeded!
[/var/root/quickadd/quickadd.zip] 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 /var/root/quickadd/quickadd.zip or /var/root/quickadd/quickadd.zip.zip, and cannot find /var/root/quickadd/quickadd.zip.ZIP, period.
2017-03-21 12:27:49 ======== Starting CasperCheck ========
2017-03-21 12:27:50 Checking for active network connection.
2017-03-21 12:27:50 Network connection appears to be live.
2017-03-21 12:27:50 Pausing for two minutes to give WiFi and DNS time to come online.
2017-03-21 12:29:50 Access to site network verified
2017-03-21 12:29:50 Machine can connect to xxxxxxx.xx.xxxxxxxx.org over port 8443. Proceeding.
2017-03-21 12:29:54 Downloading Casper agent installer from server.
2017-03-21 12:29:55 Downloaded zip file appears to be corrupted. Exiting CasperCheck.
2017-03-21 12:29:55 ======== CasperCheck Finished ========
Posted on 03-21-2017 02:51 PM
If you look at the script, that error message happens when running
/usr/bin/unzip -tq $quickadd_zip > /dev/null; echo $?
I would try to manually run curl and see if the quickadd downloads properly and go from there. This may be something unique with you hosting it on Dropbox.
Posted on 03-23-2017 06:48 AM
Thanks for your response. I'm not the strongest scripter out there, so I am trying to follow through with this to see if I can get what you're saying.