-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a99f6a0
commit 39aa74e
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import subprocess | ||
from harden import config_file | ||
|
||
def get_script(config): | ||
file_systems_config = config["file-systems"] | ||
# Start with an empty script and build it up | ||
script = "" | ||
|
||
if file_systems_config['config-fs']['dev_shm']: | ||
# Each file system gets its own set of commands | ||
script += f""" | ||
apt install aide aide-common | ||
aideinit | ||
mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db | ||
""" | ||
return script | ||
|
||
if __name__ == "__main__": | ||
config = config_file.read() | ||
print(get_script(config)) |