Bug fix
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
import re
|
||||
|
||||
from os.path import isfile as file_exists
|
||||
|
||||
from . import utils
|
||||
|
||||
|
||||
@@ -68,7 +70,8 @@ class DEBPackage(Package):
|
||||
f"{url} {codename} main"
|
||||
)
|
||||
target_file = f"/etc/apt/source.list.d/{name}.list"
|
||||
utils.exec_cmd(f'echo "{line} | sude tee {target_file}')
|
||||
tee_option = "-a" if file_exists(target_file) else ""
|
||||
utils.exec_cmd(f'echo "{line}" | sude tee {tee_option} {target_file}')
|
||||
self.index_updated = False
|
||||
|
||||
def update(self):
|
||||
|
||||
@@ -95,6 +95,7 @@ class Rspamd(base.Installer):
|
||||
"https://rspamd.com/doc/quickstart.html#setting-the-controller-password")
|
||||
_context["controller_password"] = self.app_config["password"]
|
||||
else:
|
||||
controller_password = controller_password.decode().replace("\n", "")
|
||||
_context["controller_password"] = controller_password
|
||||
_context["greylisting_disabled"] = "" if not self.app_config["greylisting"].lower() == "true" else "#"
|
||||
_context["whitelist_auth_enabled"] = "" if self.app_config["whitelist_auth"].lower() == "true" else "#"
|
||||
|
||||
Reference in New Issue
Block a user