[pmg-devel] [PATCH pmg-api] restart postfix after first installing pmg-api

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Jul 26 11:59:59 CEST 2019


On Fri, Jul 26, 2019 at 11:23:34AM +0200, Dominik Csapak wrote:
> when installing on debian, restarting postfix is necessary for it
> to change the bind address (default is 127.0.0.1)
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  debian/postinst | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/debian/postinst b/debian/postinst
> index ae8d275..8f84fc6 100644
> --- a/debian/postinst
> +++ b/debian/postinst
> @@ -32,6 +32,7 @@ case "$1" in
>  		    deb-systemd-invoke reload-or-try-restart postgresql.service
>  		fi
>  		pmgconfig sync --restart
> +		deb-systemd-invoke restart postfix.service

why not the usual '>/dev/null || true' ?

also, I wonder if the whole block isn't wrong:

for an upgrade, we only do 'pmgconfig sync'. for a fresh install, we do
reload-or-try-restart of postgresql and 'pmgconfig sync --restart'

isn't this reversed? and shouldn't we always do a 'pmgconfig sync
--restart' (since that should only restart services if needed anyway)?

>  	    fi
>  
>  	    pmgdb update  >/dev/null 2>&1 &
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> pmg-devel mailing list
> pmg-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
> 



More information about the pmg-devel mailing list