summaryrefslogtreecommitdiffstatshomepage
path: root/canonical
diff options
context:
space:
mode:
Diffstat (limited to 'canonical')
-rw-r--r--canonical/systemd/dotfiles-mattermost-keyring.path8
-rw-r--r--canonical/systemd/dotfiles-mattermost-keyring.service12
2 files changed, 20 insertions, 0 deletions
diff --git a/canonical/systemd/dotfiles-mattermost-keyring.path b/canonical/systemd/dotfiles-mattermost-keyring.path
new file mode 100644
index 0000000..6d3f852
--- /dev/null
+++ b/canonical/systemd/dotfiles-mattermost-keyring.path
@@ -0,0 +1,8 @@
+[Unit]
+Description=Watch the Mattermost Snap AppArmor profile
+
+[Path]
+PathChanged=/var/lib/snapd/apparmor/profiles/snap.mattermost-desktop.mattermost-desktop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/canonical/systemd/dotfiles-mattermost-keyring.service b/canonical/systemd/dotfiles-mattermost-keyring.service
new file mode 100644
index 0000000..fd75f86
--- /dev/null
+++ b/canonical/systemd/dotfiles-mattermost-keyring.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Allow Mattermost Snap to use GNOME Keyring
+After=snapd.apparmor.service snapd.service apparmor.service
+Before=display-manager.service
+ConditionPathExists=/var/lib/snapd/apparmor/profiles/snap.mattermost-desktop.mattermost-desktop
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/python3 /usr/local/lib/dotfiles/mattermost_keyring.py
+
+[Install]
+WantedBy=multi-user.target