mirror of
https://github.com/docker-mailserver/docker-mailserver
synced 2024-11-08 10:49:17 +01:00
Makefile: Remove backup/restore of obsolete config directory (#2479)
This commit is contained in:
parent
5b5b444094
commit
b730942b96
6
Makefile
6
Makefile
@ -14,14 +14,12 @@ build:
|
||||
docker build -t $(NAME) . --build-arg VCS_VER=$(VCS_VER) --build-arg VCS_REF=$(VCS_REF)
|
||||
|
||||
backup:
|
||||
# if backup directories exist, clean hasn't been called, therefore
|
||||
# if backup directory exist, clean hasn't been called, therefore
|
||||
# we shouldn't overwrite it. It still contains the original content.
|
||||
-@ [[ ! -d config.bak ]] && cp -rp config config.bak || :
|
||||
-@ [[ ! -d testconfig.bak ]] && cp -rp test/config testconfig.bak || :
|
||||
|
||||
clean:
|
||||
# remove running and stopped test containers
|
||||
-@ [[ -d config.bak ]] && { rm -rf config ; mv config.bak config ; } || :
|
||||
# remove test containers and restore test/config directory
|
||||
-@ [[ -d testconfig.bak ]] && { sudo rm -rf test/config ; mv testconfig.bak test/config ; } || :
|
||||
-@ for container in $$(docker ps -a --filter name='^/mail$$|^ldap_for_mail$$|^mail_override_hostname$$|^mail_non_subdomain_hostname$$|^open-dkim$$|^hadolint$$|^eclint$$|^shellcheck$$|mail_changedetector.*' | sed 1d | cut -f 1-1 -d ' '); do docker rm -f $$container; done
|
||||
-@ sudo rm -rf test/onedir test/alias test/quota test/relay test/config/dovecot-lmtp/userdb test/config/key* test/config/opendkim/keys/domain.tld/ test/config/opendkim/keys/example.com/ test/config/opendkim/keys/localdomain2.com/ test/config/postfix-aliases.cf test/config/postfix-receive-access.cf test/config/postfix-receive-access.cfe test/config/dovecot-quotas.cf test/config/postfix-send-access.cf test/config/postfix-send-access.cfe test/config/relay-hosts/chksum test/config/relay-hosts/postfix-aliases.cf test/config/dhparams.pem test/config/dovecot-lmtp/dh.pem test/config/relay-hosts/dovecot-quotas.cf test/config/user-patches.sh test/alias/config/postfix-virtual.cf test/quota/config/dovecot-quotas.cf test/quota/config/postfix-accounts.cf test/relay/config/postfix-relaymap.cf test/relay/config/postfix-sasl-password.cf test/duplicate_configs/
|
||||
|
Loading…
Reference in New Issue
Block a user