-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·35 lines (29 loc) · 1 KB
/
install.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
#!/usr/bin/bash
mkdir -p /usr/share/ngrok-runner
mkdir -p /var/log/ngrok-runner
chown syslog:syslog /var/log/ngrok-runner
mkdir -p /etc/ngrok-runner
cp ./sample.config.yaml /etc/ngrok-runner/config.yaml
cat <<EOT >> /etc/rsyslog.d/ngrok-runner.conf
if $programname == 'ngrok-runner-service' then /var/log/ngrok-runner/output.log
& stop
EOT
cp ./ngrok-runner /usr/share/ngrok-runner/ngrok-runner
cp ./ngrok /usr/share/ngrok-runner/ngrok
cp ./start_ngrok.sh /usr/share/ngrok-runner/start_ngrok.sh
chmod +x /usr/share/ngrok-runner/start_ngrok.sh
rm /etc/systemd/system/ngrok-runner.service
systemctl daemon-reload
cp ./ngrok-runner.service /etc/systemd/system/ngrok-runner.service
systemctl daemon-reload
systemctl enable ngrok-runner
echo "
[+] Successfully installed ngrok-runner.
Use the following commands to:
start the service:
- $ systemctl start ngrok-runner
stop the service:
- $ systemctl stop ngrok-runner
enable auto-start on system boot:
- $ systemctl enable ngrok-runner
"