Skip to content

Instantly share code, notes, and snippets.

@gitpel
Last active November 26, 2019 21:03
Show Gist options
  • Save gitpel/6c12517f80ff297985b1280456a2d008 to your computer and use it in GitHub Desktop.
Save gitpel/6c12517f80ff297985b1280456a2d008 to your computer and use it in GitHub Desktop.
Auto Update Script for ESET ERA7 Management + WebConsole
#!/bin/bash
cd /eset
ERA_URL=https://download.eset.com/com/eset/apps/business/era/server/linux/latest/server-linux-x86_64.sh
WEBCONSOL_URL=https://download.eset.com/com/eset/apps/business/era/webconsole/latest/era.war
ERA_CONSOLE_PORT=2223
wget -N "$ERA_URL" 2>&1 | grep "not modified on server" && exit 0
chmod +x server-linux-x86_64.sh
wget https://download.eset.com/com/eset/apps/business/era/webconsole/latest/era.war -O era.war
systemctl stop tomcat7
systemctl stop eraserver
rm -rf /var/lib/tomcat7/webapps/*
unzip era.war -d /var/lib/tomcat7/webapps/ROOT
find /var/lib/ -iname "EraWebServerConfig.properties" -exec sed -i "s/server_port=2223/server_port=$ERA_CONSOLE_PORT/" {} \;
bash ./server-linux-x86_64.sh --skip-license --disable-imp-program
systemctl start eraserver
systemctl start tomcat7
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment