Skip to content

Commit

Permalink
Split log rm commands into separate shells
Browse files Browse the repository at this point in the history
otherwise, if one fails, the following ones are not run.
  • Loading branch information
tituspijean authored and OniriCorpe committed May 5, 2024
1 parent 1f52c46 commit 82c682d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,10 @@ def tools_basic_space_cleanup():
"""
subprocess.run("apt autoremove && apt autoclean", shell=True)
subprocess.run("journalctl --vacuum-size=50M", shell=True)
subprocess.run(
"rm /var/log/*.gz && rm /var/log/*/*.gz && rm /var/log/*.? && rm /var/log/*/*.?",
shell=True,
)
subprocess.run("rm /var/log/*.gz", shell=True)
subprocess.run("rm /var/log/*/*.gz", shell=True)
subprocess.run("rm /var/log/*.?", shell=True)
subprocess.run("rm /var/log/*/*.?", shell=True)


# ############################################ #
Expand Down

0 comments on commit 82c682d

Please sign in to comment.