Jan Kundrát | 41d2d26 | 2017-10-27 18:29:33 +0200 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Persisting persistent sysrepo datastores to /cfg |
Jan Kundrát | d595c95 | 2018-08-22 19:17:31 +0200 | [diff] [blame] | 3 | After=sysrepod.service cfg.mount |
Jan Kundrát | 41d2d26 | 2017-10-27 18:29:33 +0200 | [diff] [blame] | 4 | Requires=cfg.mount |
| 5 | |
| 6 | [Service] |
| 7 | Type=simple |
Jan Kundrát | 6b36548 | 2020-03-07 16:35:14 -0800 | [diff] [blame] | 8 | ExecStart=/bin/sh -c 'while true; do inotifywait -e CLOSE_WRITE /etc/sysrepo/data/*.startup /etc/sysrepo/data/*.persist && mkdir -p /cfg/etc/sysrepo/data/ && cp -a /etc/sysrepo/data/*.startup /etc/sysrepo/data/*.persist /cfg/etc/sysrepo/data/; done' |