forked from buitim/ios-signer-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-ish.sh
executable file
·38 lines (31 loc) · 1.12 KB
/
install-ish.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
36
37
38
#!/bin/sh
set -e
echo "Installing dependencies..."
apk add curl jq unzip
echo "Installing ngrok..."
curl -sfSL https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-386.zip -o ngrok.zip
unzip -o ngrok.zip
rm ngrok.zip
chmod +x ngrok
echo "Installing service..."
LATEST_VERSION=$(curl -sfSL "https://api.github.com/repos/signtools/ios-signer-service/releases/latest" | jq -r .tag_name)
curl -sfSL "https://github.com/SignTools/ios-signer-service/releases/download/$LATEST_VERSION/ios-signer-service_${LATEST_VERSION#?}_linux_386" -o ios-signer-service
chmod +x ios-signer-service
echo "Installing runner script..."
cat <<EOF >start-signer.sh
#!/bin/sh
set -e
trap 'trap " " SIGTERM; kill 0; wait' SIGINT SIGTERM EXIT
echo "Starting service..."
./ngrok http -inspect=false 8080 &
./ios-signer-service -host localhost -ngrok-port 4040 &
cat /dev/location > /dev/null &
sleep 5
echo "Press Ctrl+C / ^+C to stop..."
sleep infinity
EOF
chmod +x start-signer.sh
echo "All done!"
echo "Don't forget to connect your ngrok account if you haven't already:"
echo "./ngrok authtoken YOUR_NGROK_TOKEN"
echo "To start the service, use: ./start-signer.sh"