I have some config files of my app. When I install my snap app, I find the config files is in /snap/app/ directory, and it is an read-only directory. How can I copy the config files to the writable directory which is /usr/snap/app/common in snapcraft.yaml ?
You probably want an install hook that copies you’re config file from $SNAP
to $SNAP_DATA
.
Hooks are just scripts that are run automatically at different times in the snap’s life cycle.
The two environment variables i mentioned are detailed here.
1 Like
I have finished it with snap hook. Thanks!
1 Like