expecting conf.yaml
in the same directory
port: 8080
endpoint: "/some/endpoint"
ips:
- 99.84.140.147
- 143.204.79.125
- 54.240.188.143
- 143.204.127.42
- 13.35.51.41
- 13.35.55.41
- 99.84.58.138
#!/usr/bin/env bash
GOOS=linux GOARCH=amd64 go build -o ip_rotation_tool
scp ip_rotation_tool conf.yaml <server>:ip_rotation_tool
- install supervisord
sudo apt-get update
sudo apt-get install -y supervisor
sudo service supervisor start
- add config
sudo vim /etc/supervisor/conf.d/ip_rotation_tool.conf
with content
[program:ip_rotation_tool]
directory=/root/home
command=/root/home/ip_rotation_tool
autostart=true
autorestart=true
stderr_logfile=/var/log/api.err
stdout_logfile=/var/log/api.log
- restart supervisor
sudo supervisorctl reload
- check the process status:
sudo supervisorctl status