-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall-linux.sh
35 lines (27 loc) · 997 Bytes
/
install-linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# Requires connectivity to:
# http://azure.archive.ubuntu.com
sudo apt install unzip
sudo mkdir -p /usr/local/bin
# Requires connectivity to:
# https://github.com/
# https://objects.githubusercontent.com/
wget "https://github.com/JanneMattila/webapp-network-tester/releases/latest/download/webappnetworktester-linux.zip" -O /tmp/webappnetworktester-linux.zip
unzip /tmp/webappnetworktester-linux.zip -d /tmp/webappnetworktester-linux
mv /tmp/webappnetworktester-linux/* /usr/local/bin/
rm -rf /tmp/webappnetworktester-linux.zip /tmp/webappnetworktester-linux
# Create as a service
sudo bash -c 'cat > /etc/systemd/system/webappnetworktester.service' << EOF
[Unit]
Description=WebApp Network Tester
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/webappnetworktester --urls http://*:80
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable webappnetworktester
sudo systemctl start webappnetworktester