I have a snap that packages a java web application, complete with logging, caches and an OSGi container.
All is working well, I’ve managed to externalise the resource locations for the database and log configuration so that it is configurable post installation.
However, we have a folder that contains the theme for the application and this lives in the web root folder.
What I need to do is sym link this to a folder in
$SNAP_USER_COMMON during installation i.e. sym link
I tried this in an install hook but it fails of course because the file system is read-only at this stage.
Is there anyway that the snap can make this happen i.e. make changes to the new file system before it becomes read-only?
It will be a big task to change our application to make this folder dynamic so anything I can do here would be a life saver.