mirror of
https://github.com/ScottESanDiego/virtwold.git
synced 2024-12-22 13:45:33 +00:00
Merge pull request #1 from simcop2387/main
Add a systemd service file example
This commit is contained in:
commit
7f30407401
@ -19,3 +19,6 @@ Usage is pretty staightforward, as the command only needs one argument: the name
|
||||
The daemon will keep running until killed with a SIGINT (`^c`).
|
||||
|
||||
Because this daemon, and wake-on-LAN, operate by MAC addresses, any VMs that are a candidate to be woken must have a hard-coded MAC in their machine configuration.
|
||||
|
||||
## systemd example service
|
||||
There's a systemd service template example in virtwold@.service that should make it easy to configure for any interfaces that you need to run on
|
||||
|
23
virtwold@.service
Normal file
23
virtwold@.service
Normal file
@ -0,0 +1,23 @@
|
||||
; An example systemd service template for virtwold
|
||||
; Using a service template lets you start multiple copies
|
||||
; of the daemon and control which interface it listens to
|
||||
; by doing something like: systemctl enable --now virtwold@br1
|
||||
; to start the daemon on the br1 network interface
|
||||
;
|
||||
; This will let you start multiple daemons easily on every interface
|
||||
; that you need things to work with
|
||||
[Unit]
|
||||
Description=libvirt wake on lan daemon
|
||||
After=network.target
|
||||
Wants=libvirtd.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
||||
; You'll want to update the path here to where you place the final compiled binary
|
||||
ExecStart=/usr/local/bin/virtwold -interface %i
|
||||
Restart=on-failure
|
||||
RestartSec=30s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user