Clear scriptherder script

This commit is contained in:
Micke Nordin 2023-03-22 08:28:28 +01:00
parent 4be1448dab
commit cdfd3b9126
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257
2 changed files with 12 additions and 0 deletions

View file

@ -90,6 +90,13 @@ class sunetdrive::scriptreceiver()
minute => '*',
hour => '*',
}
file { '/usr/local/bin/clear_scriptherder':
ensure => file,
content => template('sunetdrive/scriptreceiver/clear_scriptherder.erb.sh'),
mode => '0740',
owner => 'root',
group => 'root',
}
file { '/home/script/bin/makeswap.sh':
ensure => absent,
}

View file

@ -0,0 +1,5 @@
#!/bin/bash
for job in $(/usr/local/bin/scriptherder | grep -Ev " OK |Start|^$|===" | awk -F ' ' '{print $9}'); do
/usr/local/bin/scriptherder --mode wrap --syslog --name "${job}" -- /bin/true
done