blob: 598d7925a66cb6ce150b78a36a5c1d582ba0cd1a [file] [log] [blame]
Jan Kundrát41d2d262017-10-27 18:29:33 +02001[Unit]
2Description=Persisting persistent sysrepo datastores to /cfg
Jan Kundrát2f100fc2020-11-02 22:10:16 +01003After=netopeer2.service cfg.mount
4Requires=netopeer2.service cfg.mount
Jan Kundrát41d2d262017-10-27 18:29:33 +02005
6[Service]
7Type=simple
Jan Kundrát2f100fc2020-11-02 22:10:16 +01008ExecStart=/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'