24 lines
391 B
Bash
Executable File
24 lines
391 B
Bash
Executable File
#!/bin/bash
|
||
|
||
if [ "$#" -eq "0" ]
|
||
then
|
||
if [ -d $DATA_PATH ]
|
||
then
|
||
find $DATA_PATH -mtime +1 -type f -name *.png -exec rm -f {} \;
|
||
find $DATA_PATH -mtime +1 -type f -name *.zip -exec rm -f {} \;
|
||
fi
|
||
else
|
||
if [ "$1" -eq "FULL" ]
|
||
then
|
||
if [ -d $DATA_PATH ]
|
||
then
|
||
rm -f $DATA_PATH/*/*
|
||
fi
|
||
if [ -d $TMP_PATH ]
|
||
then
|
||
rm -f $TMP_PATH/*
|
||
fi
|
||
fi
|
||
fi
|
||
|