Skip to content

Instantly share code, notes, and snippets.

@jialechan
Last active October 16, 2017 08:20
Show Gist options
  • Save jialechan/c7fe0ac9da371e8fe285ee759e582d53 to your computer and use it in GitHub Desktop.
Save jialechan/c7fe0ac9da371e8fe285ee759e582d53 to your computer and use it in GitHub Desktop.
#!/bin/bash
source /etc/profile
cd /userdata1/server_script/
rm -r LogAnalytics.jar
wget `curl -s https://api.github.com/repos/jialechan/LogAnalytics/releases/latest | jq -r ".assets[].browser_download_url"` -O LogAnalytics.jar
/userdata1/software/jdk1.8/bin/java -jar LogAnalytics.jar --dateStr=`date -d yesterday +%Y-%m-%d`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment