blob: ae06e96e603fb645b79ecfcbd6b3b26b31f5e240 [file] [log] [blame]
Jan Kundrát41d2d262017-10-27 18:29:33 +02001[Unit]
2Description=Persisting persistent sysrepo datastores to /cfg
Jan Kundrátd595c952018-08-22 19:17:31 +02003After=sysrepod.service cfg.mount
Jan Kundrát41d2d262017-10-27 18:29:33 +02004Requires=cfg.mount
5
6[Service]
7Type=simple
8ExecStart=/bin/sh -c 'while true; do inotifywait -e CLOSE_WRITE /etc/sysrepo/data/*.startup && mkdir -p /cfg/etc/sysrepo/data/ && cp -a /etc/sysrepo/data/*.startup /cfg/etc/sysrepo/data/; done'