Removing whitespace at the top of the sudo scripts
This commit is contained in:
parent
7bde05d797
commit
bae5bfe7f3
3 changed files with 3 additions and 5 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
dns_script = """
|
dns_script = """#!/bin/bash
|
||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if [[ "$EUID" -ne 0 ]]; then
|
if [[ "$EUID" -ne 0 ]]; then
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
firewall_script = """
|
firewall_script = """#!/bin/bash
|
||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if [[ "$EUID" -ne 0 ]]; then
|
if [[ "$EUID" -ne 0 ]]; then
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ def sudo_assets_folder_setup() -> bool:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(file_path, 'w') as f:
|
with open(file_path, 'w') as f:
|
||||||
f.write(content)
|
f.write(content.lstrip('\n'))
|
||||||
logger.info(f"[MANAGE ASSETS] File written for {filename}.")
|
logger.info(f"[MANAGE ASSETS] File written for {filename}.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"[MANAGE ASSETS] Failed to write to file for {filename} at {file_path} because {e}.")
|
logger.error(f"[MANAGE ASSETS] Failed to write to file for {filename} at {file_path} because {e}.")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue