I wanted to make a snap of the XWiki using the Debian package (Since it already has a working Debian package ).
when you install XWiki it installs a service, it’s registered in systemd.
How do I expose the service to the host using the apps part of the snap?
I can’t find the service startup script when I unsquashfs the contents of the snap .
The startup script is located in
When I use the following location in the command(in apps part): it throws this error
Failed to generate snap metadata: The specified command ‘usr/libexec/tomcat9/tomcat-start.sh’ defined in the app ‘xwiki’ does not exist.
Ensure that ‘usr/libexec/tomcat9/tomcat-start.sh’ is installed with the correct path.
have you tried building the snap with
That way you could poke around the different stages of the snap and see where tomcat-start.sh is being put.
As for running the systemd service, you are going to have to look into services and daemons when defining it in the app: portion of your snapcraft.yaml.
apt-get to install xwiki. This won’t work to build a snap package. If you want to use a debian package to create the snap from, then you either need to use the dump plugin with the deb package listed as the
source: entry, or you need to use
package-repositories: to configure your debian package store and signing key and then list the package name in
I tried looking into the snap with --debug and was able to find where the tomcat-start. sh file is located .(usr/libexec/tomcat9/tomcat-start.sh.) But I can’t seem to use the file location in the app part (file or folder does not exist ).
will just adding the tomcat-start.sh file in the command make it work? (the service might need a lot of things and I don’t really understand how to make it work ?)
how can I access those files?
have updated my parts to the following :