As for the two .override files: Call "systemctl disable isc-dhcp-server isc-dhcp-server6" in the postinst; presumably you want to disable the IPv6 one as well (that's something that the current maas-cluster-controller doesn't do, it doesn't ship an upstart .override for that). Same for squid3.
As for maas-proxy.conf: "start on (local-filesystems and net-device-up IFACE!=lo)" translates to
if you don't want to start it if there's no interface. "stop on" doesn't need to be translated, and the pre-start and start scripts can be taken literally into
ExecStartPre=/bin/sh -ec ' ...' lines like in the above isc-dhcp script (note that you need to use \ for multiple lines). To make this a bit more elegant and avoid the shell, you could split this into two units maas-proxy-squid.service and maas-proxy-squid3.service:
As for the two .override files: Call "systemctl disable isc-dhcp-server isc-dhcp-server6" in the postinst; presumably you want to disable the IPv6 one as well (that's something that the current maas-cluster- controller doesn't do, it doesn't ship an upstart .override for that). Same for squid3.
As for maas-proxy.conf: "start on (local-filesystems and net-device-up IFACE!=lo)" translates to
Requires= network- online. target network- online. target
After=
if you don't want to start it if there's no interface. "stop on" doesn't need to be translated, and the pre-start and start scripts can be taken literally into
ExecStartPre= /bin/sh -ec ' ...' lines like in the above isc-dhcp script (note that you need to use \ for multiple lines). To make this a bit more elegant and avoid the shell, you could split this into two units maas-proxy- squid.service and maas-proxy- squid3. service:
[Unit] network- online. target online. target Executable= /usr/sbin/ squid
Description=...
Requires=
After=network-
ConditionFileIs
[Service] maas/maas- proxy-common. sh; pre_start' /usr/sbin/ squid -N -f /etc/maas/ maas-proxy. conf
ExecStarPre=/bin/sh -ec '. /usr/share/
ExecStart=
[Install] multi-user. target
WantedBy=
And a similar unit for -squid3.service.