Fixed issue with cleaning up downloaded .deb file
This commit is contained in:
parent
ca8264e5c1
commit
112ef045ac
@ -42,8 +42,10 @@ while true; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
msg_info "Getting Splunk Enterprise download link"
|
||||||
DOWNLOAD_URL=$(curl -s "https://www.splunk.com/en_us/download/splunk-enterprise.html" | grep -o 'data-link="[^"]*' | sed 's/data-link="//' | grep "https.*products/splunk/releases" | grep "\.deb$")
|
DOWNLOAD_URL=$(curl -s "https://www.splunk.com/en_us/download/splunk-enterprise.html" | grep -o 'data-link="[^"]*' | sed 's/data-link="//' | grep "https.*products/splunk/releases" | grep "\.deb$")
|
||||||
RELEASE=$(echo "$DOWNLOAD_URL" | sed 's|.*/releases/\([^/]*\)/.*|\1|')
|
RELEASE=$(echo "$DOWNLOAD_URL" | sed 's|.*/releases/\([^/]*\)/.*|\1|')
|
||||||
|
msg_ok "Got Splunk Enterprise v${RELEASE} download link"
|
||||||
|
|
||||||
msg_info "Setup Splunk Enterprise"
|
msg_info "Setup Splunk Enterprise"
|
||||||
$STD curl -fsSL -o "splunk-enterprise.deb" "$DOWNLOAD_URL" || {
|
$STD curl -fsSL -o "splunk-enterprise.deb" "$DOWNLOAD_URL" || {
|
||||||
@ -51,7 +53,7 @@ $STD curl -fsSL -o "splunk-enterprise.deb" "$DOWNLOAD_URL" || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
$STD dpkg -i "splunk-enterprise.deb"
|
$STD dpkg -i "splunk-enterprise.deb"
|
||||||
rm -f "$DEB_FILE"
|
rm -f "splunk-enterprise.deb"
|
||||||
msg_ok "Setup Splunk Enterprise v${RELEASE}"
|
msg_ok "Setup Splunk Enterprise v${RELEASE}"
|
||||||
|
|
||||||
msg_info "Creating Splunk admin user"
|
msg_info "Creating Splunk admin user"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user