#!/bin/sh while [ -n "$1" ]; do case "$1" in -u|--user|--username) user="$2"; shift 2;; -p|--pass|--password) pass="$2"; shift 2;; --carmeuse) user="carmeuse"; pass="12carmeuse34"; shift 1;; *) shift 1;; esac done wget -O XI_DiagnosticProfile.sh https://assets.nagios.com/downloads/support/XI_DiagnosticProfile.sh chown root XI_DiagnosticProfile.sh chmod 700 XI_DiagnosticProfile.sh ./XI_DiagnosticProfile.sh Support # Upload it echo "Uploading as $user..." curl -X PUT -u ${user}:${pass} https://cloud.everwatch.global/remote.php/dav/files/${user}/ -T /usr/local/nagiosxi/var/components/profile/profile.zip echo "Done."