ScriptCollection 4.2.83__py3-none-any.whl → 4.2.85__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ScriptCollection/CertificateUpdater.py +10 -4
- ScriptCollection/ScriptCollectionCore.py +1 -1
- ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py +2 -2
- {scriptcollection-4.2.83.dist-info → scriptcollection-4.2.85.dist-info}/METADATA +1 -1
- {scriptcollection-4.2.83.dist-info → scriptcollection-4.2.85.dist-info}/RECORD +8 -8
- {scriptcollection-4.2.83.dist-info → scriptcollection-4.2.85.dist-info}/top_level.txt +0 -2
- {scriptcollection-4.2.83.dist-info → scriptcollection-4.2.85.dist-info}/WHEEL +0 -0
- {scriptcollection-4.2.83.dist-info → scriptcollection-4.2.85.dist-info}/entry_points.txt +0 -0
|
@@ -6,6 +6,7 @@ from shutil import copyfile
|
|
|
6
6
|
import argparse
|
|
7
7
|
from .GeneralUtilities import GeneralUtilities
|
|
8
8
|
from .ScriptCollectionCore import ScriptCollectionCore
|
|
9
|
+
from .SCLog import LogLevel
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class CertificateUpdater:
|
|
@@ -107,13 +108,15 @@ class CertificateUpdater:
|
|
|
107
108
|
GeneralUtilities.write_message_to_stdout(f"Create certificate for domain {domain}")
|
|
108
109
|
dockerargument = f"run --rm --name {certbot_container_name} --volume {self.__letsencrypt_folder}:/etc/letsencrypt"
|
|
109
110
|
dockerargument = dockerargument + f" --volume {self.__log_folder}:/var/log/letsencrypt -p 80:80 "+self.__certbot_image_address_with_tag
|
|
110
|
-
certbotargument = f"--standalone --email {self.__email} --agree-tos --force-renewal --rsa-key-size 4096 --non-interactive --no-eff-email --domain {domain}"
|
|
111
|
+
certbotargument = f"--standalone --email {self.__email} --agree-tos --force-renewal --rsa-key-size 4096 --non-interactive --no-eff-email --domain {domain} certonly"
|
|
112
|
+
if self.__sc.log.loglevel==LogLevel.Debug:
|
|
113
|
+
certbotargument=certbotargument+" -v"
|
|
111
114
|
if (certificate_for_domain_already_exists):
|
|
112
|
-
self.__sc.run_program("docker", f"{dockerargument}
|
|
115
|
+
self.__sc.run_program("docker", f"{dockerargument} --no-random-sleep-on-renew {certbotargument}", self.__current_folder)
|
|
113
116
|
self.__replace_symlinks_by_files(domain)
|
|
114
117
|
GeneralUtilities.write_message_to_stdout(f"Certificates updated for {domain}.")
|
|
115
118
|
else:
|
|
116
|
-
self.__sc.run_program("docker", f"{dockerargument}
|
|
119
|
+
self.__sc.run_program("docker", f"{dockerargument} --cert-name {domain} {certbotargument}", self.__current_folder)
|
|
117
120
|
except Exception as exception:
|
|
118
121
|
error_occurred = True
|
|
119
122
|
GeneralUtilities.write_exception_to_stderr_with_traceback(exception, traceback, "Error while updating certificate")
|
|
@@ -137,10 +140,13 @@ class CertificateUpdater:
|
|
|
137
140
|
|
|
138
141
|
@GeneralUtilities.check_arguments
|
|
139
142
|
def update_certificates_if_required(self) -> None:
|
|
143
|
+
now = datetime.now()
|
|
140
144
|
parser = argparse.ArgumentParser(description="Updated lets-encrypt-certificates")
|
|
141
145
|
parser.add_argument('-f', '--force', action='store_true', required=False, default=False)
|
|
146
|
+
parser.add_argument('-v', '--verbose', action='store_true', required=False, default=False)
|
|
142
147
|
args = parser.parse_args(self.__arguments)
|
|
143
|
-
|
|
148
|
+
if args.verbose:
|
|
149
|
+
self.__sc.log.loglevel = LogLevel.Debug
|
|
144
150
|
if (self.__get_last_certificate_update_date()+timedelta(days=self.maximal_age_of_certificates_in_days)) < now or args.force:
|
|
145
151
|
GeneralUtilities.write_message_to_stdout(f"Update certificates...")
|
|
146
152
|
self.__update_certificates()
|
|
@@ -100,13 +100,13 @@ class TFCPS_CodeUnitSpecific_Python_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
100
100
|
@GeneralUtilities.check_arguments
|
|
101
101
|
def get_dependencies(self)->dict[str,set[str]]:
|
|
102
102
|
return GeneralUtilities.merge_dependency_lists([
|
|
103
|
-
self.
|
|
103
|
+
self.get_dependencies_from_pyprojecttoml(),
|
|
104
104
|
self.get_dependencies_from_requirementstxt(),
|
|
105
105
|
self.get_dependencies_from_otherrequirementstxt()
|
|
106
106
|
])
|
|
107
107
|
|
|
108
108
|
@GeneralUtilities.check_arguments
|
|
109
|
-
def
|
|
109
|
+
def get_dependencies_from_pyprojecttoml(self)->list[Dependency]:
|
|
110
110
|
setupcfg_file=os.path.join(self.get_codeunit_folder(),"pyproject.toml")
|
|
111
111
|
lines = GeneralUtilities.read_lines_from_file(setupcfg_file)
|
|
112
112
|
result:list[Dependency]=[]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptcollection
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.85
|
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
5
|
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
@@ -5,7 +5,7 @@ Other/QualityCheck/Linting.py,sha256=l9TWbo_HOQ1YUn23Kg_ZWDozdPGSwX-du7Haip8_2xQ
|
|
|
5
5
|
Other/QualityCheck/RunTestcases.py,sha256=3vJBquOr9q1DhF4648FhY_sXS-DV_l193mE_O9M7ueM,360
|
|
6
6
|
Other/Reference/GenerateReference.py,sha256=MFzu7U1OHxgecYDi7WSulO8XRGBsgkdqV_r_jkyVF7c,369
|
|
7
7
|
ScriptCollection/AnionBuildPlatform.py,sha256=GyR8CvKuEUrkoJcN32TxKVZpVwxaCwyvuofTpaCq03s,11761
|
|
8
|
-
ScriptCollection/CertificateUpdater.py,sha256=
|
|
8
|
+
ScriptCollection/CertificateUpdater.py,sha256=dR5JpJDlZdjD4_pgMz7zCrt1IM7VfatmK6pULSczxQw,9693
|
|
9
9
|
ScriptCollection/Executables.py,sha256=x70zXtGdOS2c2zzlBzIlG-HY9NY4ULKXbz6TyvAqbTA,44801
|
|
10
10
|
ScriptCollection/GeneralUtilities.py,sha256=4vjvb1zxnXJaUKu7j_bB55r0OBS7fD_MxegW6JG0SYM,66077
|
|
11
11
|
ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
|
|
@@ -15,7 +15,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
|
|
|
15
15
|
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
|
16
16
|
ScriptCollection/ProgramRunnerSudo.py,sha256=_khC3xuTdrPoLluBJZWfldltmmuKltABJPcbjZSFW-4,4835
|
|
17
17
|
ScriptCollection/SCLog.py,sha256=8TRy1LeYMsPOIuWUcnUNNbO5pd-cNBS-3cn-kdzP8FU,4768
|
|
18
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
18
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=ggDiZ1EmfnoaIvkqi6Hod0T_cEDQdWg5Vf6ctR8IG64,189103
|
|
19
19
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=o129UYDtLymCRjMZBP9Puaj19ueMHoNt6UTLspfnaRc,1758
|
|
21
21
|
ScriptCollection/OCIImages/OCIImageManager.py,sha256=2muW4hJ_a7EfavY3WVnafqZ0HC87RcZsoTuNvA3c0To,11175
|
|
@@ -55,7 +55,7 @@ ScriptCollection/TFCPS/Maven/TFCPS_CodeUnitSpecific_Maven.py,sha256=WcWWtCV3GkAk
|
|
|
55
55
|
ScriptCollection/TFCPS/Maven/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
56
|
ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=57I7xbLtCtH-Edt1QKCSXF7wnGyAhbGMdghD_VFZIIY,13184
|
|
57
57
|
ScriptCollection/TFCPS/NodeJS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
|
-
ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=
|
|
58
|
+
ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=WzKz3coWh-YoPO9U1S9TueSzGT0VibkeTEHgBM4JjEw,13695
|
|
59
59
|
ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
60
|
ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
|
|
61
61
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -291,8 +291,8 @@ build/lib/build/lib/build/lib/build/lib/ScriptCollection/TFCPS/Python/TFCPS_Code
|
|
|
291
291
|
build/lib/build/lib/build/lib/build/lib/ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
292
292
|
build/lib/build/lib/build/lib/build/lib/ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
|
|
293
293
|
build/lib/build/lib/build/lib/build/lib/ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
294
|
-
scriptcollection-4.2.
|
|
295
|
-
scriptcollection-4.2.
|
|
296
|
-
scriptcollection-4.2.
|
|
297
|
-
scriptcollection-4.2.
|
|
298
|
-
scriptcollection-4.2.
|
|
294
|
+
scriptcollection-4.2.85.dist-info/METADATA,sha256=lgooWAP8cXwyle75vQA30XvzjVIMZEI-nGLh_WQbcmQ,7696
|
|
295
|
+
scriptcollection-4.2.85.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
296
|
+
scriptcollection-4.2.85.dist-info/entry_points.txt,sha256=27XwAJEcaMEc1be0Ec1vKHCbiU4Ziu8jKL-SqsrYOIQ,4680
|
|
297
|
+
scriptcollection-4.2.85.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
298
|
+
scriptcollection-4.2.85.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|