Remove usage of 'to_keep' directory. Use existing Trash instead

This commit is contained in:
ekimia 2019-06-10 17:36:05 +02:00
parent 3d3aa17d8f
commit fbd527bacf

View file

@ -91,10 +91,10 @@ case "$1" in
cd /data/domains
tar cvzf ${2}.tgz ./${2}
if [ -f ./${2}.tgz ]; then
if [ ! -d /data/domains/to_keep/ ]; then
mkdir /data/domains/to_keep/
if [ ! -d /data/trash/ ]; then
mkdir /data/trash/
fi
mv ${2}.tgz /data/domains/to_keep/
mv ${2}.tgz /data/trash/
rm -rf /data/domains/${2}
rm -rf /system/haproxy/certs/${2}
rm /system/haproxy/haproxy/certs/${2}.pem