atomicshop 2.11.35__py3-none-any.whl → 2.11.38__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.
Potentially problematic release.
This version of atomicshop might be problematic. Click here for more details.
- atomicshop/__init__.py +1 -1
- atomicshop/wrappers/dockerw/install_docker.py +3 -0
- atomicshop/wrappers/elasticsearchw/infrastructure.py +1 -1
- atomicshop/wrappers/elasticsearchw/install_elastic.py +4 -4
- atomicshop/wrappers/ubuntu_terminal.py +14 -0
- {atomicshop-2.11.35.dist-info → atomicshop-2.11.38.dist-info}/METADATA +1 -1
- {atomicshop-2.11.35.dist-info → atomicshop-2.11.38.dist-info}/RECORD +10 -10
- {atomicshop-2.11.35.dist-info → atomicshop-2.11.38.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.11.35.dist-info → atomicshop-2.11.38.dist-info}/WHEEL +0 -0
- {atomicshop-2.11.35.dist-info → atomicshop-2.11.38.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
|
@@ -176,6 +176,9 @@ def install_docker_ubuntu(
|
|
|
176
176
|
# Add appropriate permissions to the docker socket, so the user can run docker commands without sudo in python.
|
|
177
177
|
# with open('/etc/profile.d/docker_vars.sh', 'w') as file:
|
|
178
178
|
# file.write('export DOCKER_HOST=unix:///run/user/1000/docker.sock')
|
|
179
|
+
|
|
180
|
+
# Since we are installing the rootless mode, this script runs without sudo, so to add the DOCKER_HOST variable
|
|
181
|
+
# to the environment, we need to add it to the /etc/profile.d/docker_vars.sh file with sudo.
|
|
179
182
|
command = "echo 'export DOCKER_HOST=unix:///run/user/1000/docker.sock' | sudo tee /etc/profile.d/docker_vars.sh"
|
|
180
183
|
subprocess.run(command, shell=True, check=True)
|
|
181
184
|
|
|
@@ -88,7 +88,7 @@ def is_elastic_config_file_exists(
|
|
|
88
88
|
if not config_file_path:
|
|
89
89
|
config_file_path = config_basic.ELASTIC_CONFIG_FILE
|
|
90
90
|
|
|
91
|
-
if not
|
|
91
|
+
if not ubuntu_terminal.is_sudo_file_exists(config_file_path):
|
|
92
92
|
if output_message:
|
|
93
93
|
message = f"Configuration file does not exist at {config_file_path}."
|
|
94
94
|
print_api(message, color='red', error_type=True)
|
|
@@ -173,8 +173,8 @@ def install_elastic_kibana_ubuntu(install_elastic: bool = True, install_kibana:
|
|
|
173
173
|
raise ValueError("At least one of the services (Elasticsearch or Kibana) must be installed.")
|
|
174
174
|
|
|
175
175
|
# Update and upgrade system packages.
|
|
176
|
-
ubuntu_terminal.upgrade_system_packages()
|
|
177
176
|
ubuntu_terminal.update_system_packages()
|
|
177
|
+
ubuntu_terminal.upgrade_system_packages()
|
|
178
178
|
|
|
179
179
|
# Install necessary dependencies.
|
|
180
180
|
ubuntu_terminal.install_packages(config_basic.UBUNTU_DEPENDENCY_PACKAGES)
|
|
@@ -196,9 +196,9 @@ def install_elastic_kibana_ubuntu(install_elastic: bool = True, install_kibana:
|
|
|
196
196
|
# Install Elasticsearch.
|
|
197
197
|
ubuntu_terminal.install_packages([config_basic.UBUNTU_ELASTIC_PACKAGE_NAME])
|
|
198
198
|
|
|
199
|
-
if not permissions.is_admin():
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
# if not permissions.is_admin():
|
|
200
|
+
# print_api("This script requires root privileges...", color='red')
|
|
201
|
+
# sys.exit(1)
|
|
202
202
|
|
|
203
203
|
# Check if the configuration file exists.
|
|
204
204
|
infrastructure.is_elastic_config_file_exists(exit_on_error=True, output_message=True)
|
|
@@ -301,3 +301,17 @@ def get_command_execution_as_sudo_executer(command: str, add_bash_exec: bool = F
|
|
|
301
301
|
return f'su {sudo_executer_username} -c "{command}"'
|
|
302
302
|
else:
|
|
303
303
|
return command
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
def is_sudo_file_exists(file_path: str) -> bool:
|
|
307
|
+
"""
|
|
308
|
+
Function checks if a file exists with sudo permissions.
|
|
309
|
+
:param file_path: str, the file path.
|
|
310
|
+
:return:
|
|
311
|
+
"""
|
|
312
|
+
|
|
313
|
+
try:
|
|
314
|
+
_ = subprocess.run(['sudo', 'test', '-e', file_path], check=True)
|
|
315
|
+
return True
|
|
316
|
+
except subprocess.CalledProcessError:
|
|
317
|
+
return False
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256
|
|
1
|
+
atomicshop/__init__.py,sha256=OHj6Zd1NXsJ_JC-owajZhCYj2h7zy6kQGaqHB_-v_TI,124
|
|
2
2
|
atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
|
|
3
3
|
atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
|
|
4
4
|
atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
|
|
@@ -152,7 +152,7 @@ atomicshop/wrappers/olefilew.py,sha256=biD5m58rogifCYmYhJBrAFb9O_Bn_spLek_9HofLe
|
|
|
152
152
|
atomicshop/wrappers/pipw.py,sha256=mu4jnHkSaYNfpBiLZKMZxEX_E2LqW5BVthMZkblPB_c,1317
|
|
153
153
|
atomicshop/wrappers/process_wrapper_pbtk.py,sha256=ycPmBRnv627RWks6N8OhxJQe8Gu3h3Vwj-4HswPOw0k,599
|
|
154
154
|
atomicshop/wrappers/pyopensslw.py,sha256=OBWxA6EJ2vU_Qlf4M8m6ilcG3hyYB4yB0EsXUf7NhEU,6804
|
|
155
|
-
atomicshop/wrappers/ubuntu_terminal.py,sha256=
|
|
155
|
+
atomicshop/wrappers/ubuntu_terminal.py,sha256=BBZD3EH6KSDORd5IZBZM-ti4U6Qh1sZwftx42s7hqB4,10917
|
|
156
156
|
atomicshop/wrappers/wslw.py,sha256=AKphiHLSddL7ErevUowr3f9Y1AgGz_R3KZ3NssW07h8,6959
|
|
157
157
|
atomicshop/wrappers/certauthw/certauth.py,sha256=hKedW0DOWlEigSNm8wu4SqHkCQsGJ1tJfH7s4nr3Bk0,12223
|
|
158
158
|
atomicshop/wrappers/certauthw/certauthw.py,sha256=4WvhjANI7Kzqrr_nKmtA8Kf7B6rute_5wfP65gwQrjw,8082
|
|
@@ -165,12 +165,12 @@ atomicshop/wrappers/ctyping/msi_windows_installer/extract_msi_main.py,sha256=eyF
|
|
|
165
165
|
atomicshop/wrappers/ctyping/msi_windows_installer/tables.py,sha256=ajiFiLXl1prg2kOhatfT8E2RKX7F8JjUJpwkVuKu1GY,16263
|
|
166
166
|
atomicshop/wrappers/dockerw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
167
167
|
atomicshop/wrappers/dockerw/dockerw.py,sha256=w8zSJr5C7cbvbuG09ORCpAe0BOcibqqL_Z2EKEBHYK4,6266
|
|
168
|
-
atomicshop/wrappers/dockerw/install_docker.py,sha256=
|
|
168
|
+
atomicshop/wrappers/dockerw/install_docker.py,sha256=IKHInhSb9iO-g9zOYRrE4EX4eA2DaSadbZ9b0brXgRk,9921
|
|
169
169
|
atomicshop/wrappers/elasticsearchw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
170
170
|
atomicshop/wrappers/elasticsearchw/config_basic.py,sha256=fDujtrjEjbWiYh_WQ3OcYp_8mXhXPYeKLy4wSPL5qM0,1177
|
|
171
171
|
atomicshop/wrappers/elasticsearchw/elasticsearchw.py,sha256=7TqFdEFznO8NlligJhEKk1vm641ALpCYdaRl1uoXdzM,9768
|
|
172
|
-
atomicshop/wrappers/elasticsearchw/infrastructure.py,sha256=
|
|
173
|
-
atomicshop/wrappers/elasticsearchw/install_elastic.py,sha256=
|
|
172
|
+
atomicshop/wrappers/elasticsearchw/infrastructure.py,sha256=iH3X0AFpuyjaxmMvppZeSJfFyIgoC3zM1z5Rjxevkk4,10309
|
|
173
|
+
atomicshop/wrappers/elasticsearchw/install_elastic.py,sha256=3TNEEFkAOcxvJYXUfKGeYjprxUu1Fl-i54dz8J3q31U,8626
|
|
174
174
|
atomicshop/wrappers/elasticsearchw/queries/__init__.py,sha256=KBjT-bAt75CJsx1Apko9mpuFU4pfZV8DcGWQvpX65RU,78
|
|
175
175
|
atomicshop/wrappers/elasticsearchw/queries/aggregation.py,sha256=N9a5yMMnb10sMa_x1qJBFQpgyJ49UWo8_vxuqmUtZ1A,1742
|
|
176
176
|
atomicshop/wrappers/elasticsearchw/queries/info.py,sha256=P_VhhBo8MvRI4Shi-bh4RsYtlYNRKRBzScXPC64Up_Q,2900
|
|
@@ -243,8 +243,8 @@ atomicshop/wrappers/socketw/socket_server_tester.py,sha256=AhpurHJmP2kgzHaUbq5ey
|
|
|
243
243
|
atomicshop/wrappers/socketw/socket_wrapper.py,sha256=aXBwlEIJhFT0-c4i8iNlFx2It9VpCEpsv--5Oqcpxao,11624
|
|
244
244
|
atomicshop/wrappers/socketw/ssl_base.py,sha256=k4V3gwkbq10MvOH4btU4onLX2GNOsSfUAdcHmL1rpVE,2274
|
|
245
245
|
atomicshop/wrappers/socketw/statistics_csv.py,sha256=t3dtDEfN47CfYVi0CW6Kc2QHTEeZVyYhc57IYYh5nmA,826
|
|
246
|
-
atomicshop-2.11.
|
|
247
|
-
atomicshop-2.11.
|
|
248
|
-
atomicshop-2.11.
|
|
249
|
-
atomicshop-2.11.
|
|
250
|
-
atomicshop-2.11.
|
|
246
|
+
atomicshop-2.11.38.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
247
|
+
atomicshop-2.11.38.dist-info/METADATA,sha256=jxVRLrOPDsCmdTFJHp9jQAgWZK-1ailC6FkRT10EKaA,10448
|
|
248
|
+
atomicshop-2.11.38.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
249
|
+
atomicshop-2.11.38.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
250
|
+
atomicshop-2.11.38.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|