I would probably use /etc/default/apparmor in more debian/ubuntu style.
But, what happens if apparmor_parser is invoked with an empty $APPARMOR_SEARCH_LIST (in the service you posted that would translate into no parameter being passed)? If that should not happen, then the EnvironmentFile should probably not have a - prefixed so that the unit fails when the file is missing.
In the more general case, systemd service files are configuration files themselves, so there is no need to introduce a new one: just set the default APPARMOR_SEARCH_LIST with an Environment key, that can be overriden via a drop-in in either /lib (by distro) or in /etc (by admin):
@seth-arnold ,
I would probably use /etc/default/ apparmor in more debian/ubuntu style.
But, what happens if apparmor_parser is invoked with an empty $APPARMOR_ SEARCH_ LIST (in the service you posted that would translate into no parameter being passed)? If that should not happen, then the EnvironmentFile should probably not have a - prefixed so that the unit fails when the file is missing.
In the more general case, systemd service files are configuration files themselves, so there is no need to introduce a new one: just set the default APPARMOR_ SEARCH_ LIST with an Environment key, that can be overriden via a drop-in in either /lib (by distro) or in /etc (by admin):
[Service] APPARMOR_ SEARCH_ LIST=/etc/ apparmor. d /usr/sbin/ apparmor_ parser -r $APPAMOR_ SEARCH_ LIST /usr/sbin/ apparmor_ parser -R $APPAMOR_ SEARCH_ LIST /usr/sbin/ apparmor_ parser --reload $APPAMOR_ SEARCH_ LIST
Type=oneshot
Environment=
ExecStart=
ExecStop=
ExecReload=
RemainAfterExit=yes
And it could be overriden with a simple snippet (eg, in /lib/systemd/ system/ apparmor. service. d/50-click- search- list.conf) :
[Service] "APPARMOR_ SEARCH_ LIST=/etc/ apparmor. d /var/foo/ click/apparmor. d"
# Im a phone
Environment=