forked from FortyWinters/autoAnimeP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clean.sh
33 lines (30 loc) · 929 Bytes
/
clean.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# usage:
# sh clean.sh image autoAnime
# sh clean.sh image mysql
# sh clean.sh image qB
# sh clean.sh
docker-compose down
if [ "$1" = "image" ]; then
if [ "$2" = "autoAnime" ]; then
echo remove image: autoanime-autoanime:latest
docker rmi autoanime-autoanime:latest
elif [ "$2" = "mysql" ]; then
echo remove image: autoanime-autoanime:latest
docker rmi mysql:latest
elif [ "$2" = "qB" ]; then
echo remove image: autoanime-autoanime:latest
docker rmi linuxserver/qbittorrent:latest
else
echo image name error, remove all images
docker rmi autoanime-autoanime:latest
docker rmi linuxserver/qbittorrent:latest
docker rmi mysql:latest
fi
else
echo remove all images
docker rmi autoanime-autoanime:latest
docker rmi linuxserver/qbittorrent:latest
docker rmi mysql:latest
fi
# sudo rm -rf log var