pm2 启动python程序,可设定定时任务
每隔10秒重启一次脚本
pm2 start job1.py --name job1-10s-delay --interpreter python3 --restart -delay 10000
每秒重启一次脚本
pm2 start .\testPm2.py --cron '0 * * * *' --no-autorestart
每隔10秒重启一次脚本
pm2 start job1.py --name job1-10s-delay --interpreter python3 --restart -delay 10000
每秒重启一次脚本
pm2 start .\testPm2.py --cron '0 * * * *' --no-autorestart
Solution:
Using iptables, I set all policies to "ACCEPT" and I was able to setup two kinds of NAT:
(192.168.2.170 is my "public" address and 10.0.0.1 is my "private" address
/-"Full Cone NAT", with the following rules:/
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 192.168.2.170
iptables -t nat -A PREROUTING -i eth0 -j DNAT --to-destination 10.0.0.1
/-"Port Restricted Cone NAT", with just a single rule:/
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 192.168.2.170/