Skip to content

Commit

Permalink
add systemd service
Browse files Browse the repository at this point in the history
  • Loading branch information
daschr committed Oct 25, 2023
1 parent 5e255d9 commit 17ae59d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 0 additions & 1 deletion container_hosts.cron

This file was deleted.

15 changes: 15 additions & 0 deletions container_hosts.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=Polls for changed container network settings and updates /etc/hosts

[Service]
Type=simple
User=root
Group=root
Restart=always
#RemainAfterExit=no
WorkingDirectory=/tmp
ExecStart=/usr/local/bin/container_hosts --interval 15 --exec "nginx -t && /usr/bin/systemctl reload nginx"
#StandardOutput=null

[Install]
WantedBy=multi-user.target

0 comments on commit 17ae59d

Please sign in to comment.