Use 1min cron to schedule portforward

This commit is contained in:
Colin Hebert
2023-05-06 10:37:45 +10:00
parent 1dd9409a82
commit b078902514
3 changed files with 2 additions and 4 deletions

View File

@@ -1,6 +1,4 @@
#!/command/with-contenv bash
chmod +x /bin/set_port.sh
(crontab -l ; echo "* * * * * /bin/set_port.sh") | sort - | uniq - | crontab -
(crontab -l ; echo "* * * * * run-parts /etc/periodic/1min") | sort - | uniq - | crontab -
crond

View File

@@ -25,10 +25,10 @@ services:
- ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/volumes/qbittorrent_config/:/config/
- ${NASCOMPOSE_DATA?}/torrents${TORRENT_SUFFIX?}/:/data/
# Configuration
- ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/set_port.sh:/bin/set_port.sh:ro
- ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/01-natpmp-install:/etc/cont-init.d/01-natpmp-install:ro
- ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/98-gateway-setup:/etc/cont-init.d/98-gateway-setup:ro
- ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/99-cron-start:/etc/cont-init.d/99-cron-start:ro
- ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/config/setPortForward:/etc/periodic/1min/setPortForward:ro
# Secrets
- ${NASCOMPOSE_SERVICES?}/torrents${TORRENT_SUFFIX?}/secrets/wg0.conf:/config/wireguard/wg0.conf:ro
restart: unless-stopped