Optional daemon

Didier Roche didrocks at ubuntu.com
Wed Nov 2 07:41:01 UTC 2016


Le 28/10/2016 à 21:00, Aaron Ogle a écrit :
> Point definitely well made.  I'm with you now.  :)
>
> Now this being the case.  I can't just swap the location.  This is
> where I would need a rock solid upgrade hook.  But I would only need
> to run it the once. Any suggestions?  Or any good examples?

Maybe Kyle missed that one.
For now, AFAIK, we don't have upgrade hook (yet ;)). I would go with the
wrapper script (that I think you already have) path. Check for the
database location in $SNAP_DATA. If nothing exists, do the migration,
remove $SNAP_COMMON database content once done.

That should do the trick?
Cheers,
Didier




More information about the Snapcraft mailing list