[Unit]
Description=Home Assistant OS data partition migration
DefaultDependencies=no
RefuseManualStart=true
RefuseManualStop=true
Requires=mnt-overlay.mount dev-disk-by\x2dlabel-hassos\x2ddata.device
Wants=hassos-expand.service
After=mnt-overlay.mount dev-disk-by\x2dlabel-hassos\x2ddata.device systemd-fsck@dev-disk-by\x2dlabel-hassos\x2ddata.service dev-disk-by\x2dpartlabel-hassos\x2ddata\x2dexternal.device
Before=hassos-expand.service
ConditionPathExists=/mnt/overlay/move-data

[Service]
Type=oneshot
ExecStartPre=-/usr/bin/rm -f /mnt/overlay/move-data
ExecStart=/usr/libexec/hassos-data

[Install]
WantedBy=local-fs.target
