[MacPorts] #60923: mail-server: possible improvements to wrapper script
MacPorts
noreply at macports.org
Thu Jul 30 13:20:48 UTC 2020
#60923: mail-server: possible improvements to wrapper script
-------------------------+-------------------------
Reporter: ryandesign | Owner: essandess
Type: enhancement | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.3
Keywords: | Port: mail-server
-------------------------+-------------------------
With default variants, mail-server installs a mail-server.wrapper file
containing in part:
{{{
#
# Start
#
Start()
{
port load clamav-server
port load apache-solr8
port load redis
port load dcc
port load postfix
port load dovecot
port load rspamd
}
#
# Stop
#
Stop()
{
port unload apache-solr8
port unload dcc
port unload postfix
port unload dovecot
port unload rspamd
}
#
# Restart
#
Restart()
{
port reload apache-solr8
port reload redis
port reload dcc
port unload postfix ; \
sleep 1 ; \
port load postfix
port unload dovecot ; \
sleep 1 ; \
port load dovecot
port reload rspamd
}
}}}
I have so many questions.
Why do you call `port load` / `unload` / `reload` for each port
individually? Why not all at once? If you are concerned that one of the
loads / unloads / reloads might fail and you want subsequent ones to be
attempted anyway, use the `-p` flag. (`port -p load clamav-server apache-
solr8 redis dcc postfix dovecot rspamd`)
Why does `Start()` load redis but `Stop()` doesn't unload it?
Why does `Start()` load clamav-server but `Stop()` doesn't unload it and
`Restart()` doesn't reload it?
Why does `Restart()` manually reload postfix and dovecot by unloading,
then waiting a second, then loading? That is exactly what reload already
does so why not use that?
--
Ticket URL: <https://trac.macports.org/ticket/60923>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list