Comment 25 for bug 1849753

Revision history for this message
jehon (jeanhonlet) wrote :

The above script of @jdstrand (comment #22) could be automated by a service.

The basic is to create the file just after snapd.service has deleted it.

Create the service in /usr/share/jehon/etc/systemd/system/lp1849753.service:

----------------------------
[Unit]
Description=Fix the App Armor profile for nodejs
Documentation=https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1849753/comments/22
Requires=snapd.service
After=snapd.service snapd.apparmor.service
PartOf=snapd.service

[Service]
Type=oneshot
ExecStart=<path-to-the-above-script>
RemainAfterExit=yes

[Install]
WantedBy=default.target

----------------------------
I am not 100% sure it does work in all cases, but worth a try