@@ -61,10 +61,11 @@ class Modoboa(base.Installer):
|
|||||||
"""Deploy Modoboa."""
|
"""Deploy Modoboa."""
|
||||||
target = os.path.join(self.home_dir, "instance")
|
target = os.path.join(self.home_dir, "instance")
|
||||||
if os.path.exists(target):
|
if os.path.exists(target):
|
||||||
|
if not self.config.getboolean("general", "force"):
|
||||||
utils.printcolor(
|
utils.printcolor(
|
||||||
"Target directory for Modoboa deployment ({}) already exists."
|
"Target directory for Modoboa deployment ({}) already "
|
||||||
" If you choose to continue, it will be removed.".format(
|
"exists. If you choose to continue, it will be removed."
|
||||||
target),
|
.format(target),
|
||||||
utils.YELLOW
|
utils.YELLOW
|
||||||
)
|
)
|
||||||
answer = utils.user_input("Do you confirm? (Y/n) ")
|
answer = utils.user_input("Do you confirm? (Y/n) ")
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class SelfSignedCertificate(CertificateBackend):
|
|||||||
def create(self):
|
def create(self):
|
||||||
"""Create a certificate."""
|
"""Create a certificate."""
|
||||||
if os.path.exists(self.config.get("general", "tls_key_file")):
|
if os.path.exists(self.config.get("general", "tls_key_file")):
|
||||||
|
if not self.config.getboolean("general", "force"):
|
||||||
answer = utils.user_input(
|
answer = utils.user_input(
|
||||||
"Overwrite the existing SSL certificate? (y/N) ")
|
"Overwrite the existing SSL certificate? (y/N) ")
|
||||||
if not answer.lower().startswith("y"):
|
if not answer.lower().startswith("y"):
|
||||||
|
|||||||
1
run.py
1
run.py
@@ -50,6 +50,7 @@ def main():
|
|||||||
answer = utils.user_input("Do you confirm? (Y/n) ")
|
answer = utils.user_input("Do you confirm? (Y/n) ")
|
||||||
if answer.lower().startswith("n"):
|
if answer.lower().startswith("n"):
|
||||||
return
|
return
|
||||||
|
config.set("general", "force", str(args.force))
|
||||||
utils.printcolor(
|
utils.printcolor(
|
||||||
"The process can be long, feel free to take a coffee "
|
"The process can be long, feel free to take a coffee "
|
||||||
"and come back later ;)", utils.BLUE)
|
"and come back later ;)", utils.BLUE)
|
||||||
|
|||||||
Reference in New Issue
Block a user