blob: 25991f4585a42c50aa5c0b2ac7b2de176b80d252 [file] [log] [blame]
Jan Kundrát41d2d262017-10-27 18:29:33 +02001[Unit]
2Description=Persisting persistent sysrepo datastores to /cfg
Tomáš Pecka04eb7372022-06-07 08:03:04 +02003After=netopeer2.service cfg.mount czechlight-migrate.service
4Requires=netopeer2.service cfg.mount czechlight-migrate.service
Jan Kundrát41d2d262017-10-27 18:29:33 +02005
6[Service]
7Type=simple
Jan Kundrát34d2f482021-01-11 19:24:09 +01008UMask=0077
Tomáš Pecka04eb7372022-06-07 08:03:04 +02009ExecStartPre=/bin/sh -c 'mkdir -p /cfg/sysrepo/ && sysrepocfg -d startup -f json -X > /cfg/sysrepo/startup.json'
10ExecStart=/bin/sh -c 'while true; do inotifywait -e CLOSE_WRITE /etc/sysrepo/data/*.startup && sysrepocfg -d startup -f json -X > /cfg/sysrepo/startup.json; done'
Tomáš Peckad3861ce2022-05-11 11:51:30 +020011Group=sysrepo