You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
441 B
18 lines
441 B
#!/bin/sh
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "Usage: $0 user@target.hostname"
|
|
exit 1
|
|
fi
|
|
|
|
set -xe
|
|
|
|
#go generate
|
|
GOOS=linux GOARCH=arm GOARM=5 go build -o golang-fasthttp
|
|
ssh $1 start-stop-daemon -x /usr/local/bin/golang-fasthttp -b -K || true
|
|
ssh $1 mkdir -p /usr/local/bin/
|
|
scp golang-fasthttp $1:/usr/local/bin/golang-fasthttp
|
|
ssh $1 start-stop-daemon -x /usr/local/bin/golang-fasthttp -b -S
|
|
ssh $1 pgrep golang-fasthttp
|
|
curl http://$1:8002/
|
|
|
|
|