[Unit] | |
Description=Persisting persistent sysrepo datastores to /cfg | |
After=cfg-yang.service | |
Requires=cfg-yang.service | |
[Service] | |
Type=simple | |
UMask=0077 | |
ExecStartPre=/bin/sh -c 'mkdir -p /cfg/sysrepo/ && cfg-save-sysrepo' | |
ExecStart=/bin/sh -c 'while true; do inotifywait -e CLOSE_WRITE /etc/sysrepo/data/*.startup && cfg-save-sysrepo; done' | |
Group=sysrepo | |
[Install] | |
WantedBy=multi-user.target |