Browse Source

systemd watcher/path Definition

master
Christian Aust 1 month ago
parent
commit
4e0567eaf8
3 changed files with 18 additions and 0 deletions
  1. +2
    -0
      .gitignore
  2. +6
    -0
      dc-watcher@.path
  3. +10
    -0
      dc-watcher@.service

+ 2
- 0
.gitignore View File

@ -0,0 +1,2 @@
run/

+ 6
- 0
dc-watcher@.path View File

@ -0,0 +1,6 @@
[Path]
Unit=dc-watcher@%i.service
PathModified=/opt/dockerfiles/run/%i
[Install]
WantedBy=multi-user.target

+ 10
- 0
dc-watcher@.service View File

@ -0,0 +1,10 @@
[Unit]
Description=%i srv restarter
After=docker.service
[Service]
Type=oneshot
ExecStart=/bin/systemctl restart dc@%i.service
[Install]
WantedBy=multi-user.target

Loading…
Cancel
Save