Update T1053.003.yaml (#1221)
Add code to make cleanup commands. Co-authored-by: Carrie Roberts <clr2of8@gmail.com>
This commit is contained in:
@@ -25,7 +25,10 @@ atomic_tests:
|
||||
executor:
|
||||
name: bash
|
||||
command: |
|
||||
crontab -l > /tmp/notevil
|
||||
echo "* * * * * #{command}" > #{tmp_cron} && crontab #{tmp_cron}
|
||||
cleanup_command: |
|
||||
crontab /tmp/notevil
|
||||
|
||||
- name: Cron - Add script to cron folder
|
||||
auto_generated_guid: b7d42afa-9086-4c8a-b7b0-8ea3faa6ebb0
|
||||
@@ -50,4 +53,6 @@ atomic_tests:
|
||||
elevation_required: true
|
||||
name: bash
|
||||
command: |
|
||||
echo "#{command}" > /etc/cron.daily/#{cron_script_name}
|
||||
echo "#{command}" > /etc/cron.daily/#{cron_script_name}
|
||||
cleanup_command: |
|
||||
rm /etc/cron.daily/#{cron_script_name}
|
||||
|
||||
Reference in New Issue
Block a user