sudo su - splunk
URI=$(curl -s https://www.splunk.com/en_us/download/splunk-enterprise.html | grep "linux" | grep -oe "https://download.*\.tgz" | tail -n1)
# oder fuer vorherige versionen z.B. 9.3.5
# URI=$(curl -s https://www.splunk.com/en_us/download/previous-releases.html | grep "linux" | grep "9.3.5" | grep -oe "https://download.*\.tgz" | tail -n1)
file=${URI##*/}
wget $URI
mkdir ${file%.tgz}
splunk stop
for i in $(ls current | grep -v "var\|manifest"); do cp -r current/$i ${file%.tgz}; done
tar xvzf ${file} --strip-components 1 -C ${file%.tgz}
rm current
ln -s ${file%.tgz} current
splunk start --accept-license --answer-yessudo su - splunk
URI=$(curl -s https://www.splunk.com/en_us/download/splunk-enterprise.html | grep "linux" | grep -oe "https://download.*\.tgz" | tail -n1)
file=${URI##*/}
wget $URI
mkdir ${file%.tgz}
splunk stop
for i in $(ls current | grep -v "var\|manifest"); do cp -r current/$i ${file%.tgz}; done
tar xvzf ${file} --strip-components 1 -C ${file%.tgz}
rm current
ln -s ${file%.tgz} current
splunk start --accept-license --answer-yes