Clear scriptherder script
This commit is contained in:
parent
4be1448dab
commit
cdfd3b9126
2 changed files with 12 additions and 0 deletions
|
@ -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,
|
||||
}
|
||||
|
|
5
templates/scriptreceiver/clear_scriptherder.erb.sh
Normal file
5
templates/scriptreceiver/clear_scriptherder.erb.sh
Normal 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
|
Loading…
Add table
Reference in a new issue