Compare commits
No commits in common. "b36658a0eef5778f3b275e58421b0be54727c825" and "570fa60df39fdf48db4cdc9531268d22ad6a085c" have entirely different histories.
b36658a0ee
...
570fa60df3
1 changed files with 2 additions and 18 deletions
|
@ -82,27 +82,11 @@ interrupt_handler() {
|
|||
exit 130
|
||||
}
|
||||
|
||||
# Function to clean up temporary files
|
||||
cleanup_files() {
|
||||
# Cleanup function
|
||||
cleanup() {
|
||||
# Remove temporary files if they exist
|
||||
[ -f "/tmp/crowdsec_services.tmp" ] && rm -f "/tmp/crowdsec_services.tmp"
|
||||
[ -f "/tmp/crowdsec_packages.tmp" ] && rm -f "/tmp/crowdsec_packages.tmp"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Function to remove the script
|
||||
remove_script() {
|
||||
if [ -f "$0" ]; then
|
||||
rm -f -- "$0"
|
||||
fi
|
||||
if [ -f "task_formatter.sh" ]; then
|
||||
rm -f task_formatter.sh
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Main cleanup function
|
||||
cleanup() {
|
||||
format_output cleanup_files "Cleaning up temporary files"
|
||||
format_output remove_script "Removing script"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue