https://github.com/zyga/snapd-peer-demo
Tracking installation of specific snaps using snapd content interface and interface hooks.
https://github.com/zyga/snapd-peer-demo
demo snapd
Last synced: about 2 months ago
JSON representation
Tracking installation of specific snaps using snapd content interface and interface hooks.
- Host: GitHub
- URL: https://github.com/zyga/snapd-peer-demo
- Owner: zyga
- Created: 2019-08-08T06:39:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-08T07:15:18.000Z (almost 7 years ago)
- Last Synced: 2025-10-09T10:38:29.007Z (8 months ago)
- Topics: demo, snapd
- Language: Shell
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tracking installation of specific snaps
This repository contains a demonstration of the usage of the snapd content
interface and interface hooks to make `program-foo` aware of installation and
removal of `program-bar`. Both programs are using classic confinement as an
additional constraint. Without that it would be somewhat easier. In practice
the notification is on connection and disconnection but this is close enough
without requiring any additional features in snapd.
Please read the source code to understand more about how they work. You can
build and install each of the snaps with `snap pack ` and `snap install
--dangerous --classic ./`. Please do note that because of how unasserted
programs are installed, you need to manually establish the connection with
`snap connect program-foo:peers program-bar:peer-info`. If the two snaps were
coming from the store, from the same publisher, the connection would be
established automatically.
Once connected you can check the status of the
snap.program-foo.peer-helper.service which is fired after connection.