On Mon, Oct 12, 2015 at 12:12:51PM -0700, James Bottomley wrote: > Package: asterisk > Version: 1:13.1.0~dfsg-1.1+b1 > Severity: normal > > Under systemv init, asterisk is spawned by /etc/init.d/asterisk, which > checks the /etc/default/asterisk file and spawns asterisk realtime > (with the -p flag) unless the default is altered to AST_REALTIME=no > > However, with the change to systemd, the default is no longer to spawn > with the -p flags. Indeed, it's no longer configurable because the > whole lot is hard coded in the /etc/systemd/system/asterisk.service > as: > > ExecStart=/usr/sbin/asterisk -g -f -U asterisk > > Firstly, I think we need to put this back to the default of being > realtime unless requested not to, and secondly, I think we need to > respect the configuration options of /etc/default/asterisk. > Unfortunately, systemd is trying to phase these files out (by ignoring > them): > > http://0pointer.de/blog/projects/on-etc-sysinit.html > > But according to the blog, there is still a way of importing shell > script like configuration files via the EnvironmentFile option, or by > spawning an actual script that reads the file.
So it's indeed possible to add: Environment=PARAMS=[something] EnvironmentFile=/etc/default/asterisk ExecStart=/usr/sbin/asterisk $PARAMS [whatever] However, this still won't allow supporting core dumps, as they require switching to a different directory. It would require an override file: ### /etc/systemd/system/asterisk.service.d/local.conf: [Service] WorkingDirectory=[something] So maybe just count on such an override file and just add: Environment=EXTRA_PARAMS= ExecStart=/usr/sbin/asterisk $PARAMS -f -U asterisk $PARAMS -- Tzafrir Cohen icq#16849755 jabber:tzafrir.co...@xorcom.com +972-50-7952406 mailto:tzafrir.co...@xorcom.com http://www.xorcom.com