[Unit]
Description=Wait for the Ubuntu Core chooser trigger
Before=snapd.service
# don't run on classic or uc16/uc18
ConditionKernelCommandLine=snapd_recovery_mode
# only run when there are input devices
ConditionPathExistsGlob=/dev/input/event*

[Service]
# blocks the service startup until a trigger is detected or a timeout is hit
Type=oneshot
ExecStart=/usr/lib/snapd/snap-bootstrap recovery-chooser-trigger
RemainAfterExit=true

[Install]
WantedBy=multi-user.target

# started on boot only
# X-Snapd-Snap: do-not-start
