-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathffighter
More file actions
executable file
·77 lines (62 loc) · 1.37 KB
/
ffighter
File metadata and controls
executable file
·77 lines (62 loc) · 1.37 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/env bash
# changing directory to be able to use relative paths.
SCRIPTS_LOCATION="/home/$USER/filefighter"
if [ ! -d $SCRIPTS_LOCATION ]; then
echo "Couldn't find scripts location under '$SCRIPTS_LOCATION'."
echo "Try reinstalling FileFighter"
exit 1
fi
cd $SCRIPTS_LOCATION
# Import necessary functions.
source lib/utils.sh
source lib/remove.sh
source lib/install.sh
source lib/start.sh
source lib/stop.sh
source lib/status.sh
source lib/update.sh
VERSION="v1.7"
DATE="13.05.21"
# Check if docker is running
if ! docker info >/dev/null 2>&1; then
echo "Docker is not running, install it first or retry."
exit 1
fi
if [ -z "$1" ]; then
echoLogo $VERSION $DATE "Show Usage"
printUsage
exit 1
fi
if [[ $1 == "status" ]]; then
echoLogo $VERSION $DATE "Show Status"
ffstatus
exit 0
fi
if [[ $1 == "install" ]]; then
echoLogo $VERSION $DATE "Installing FileFighter"
ffinstall
exit 0
fi
if [[ $1 == "start" ]]; then
echoLogo $VERSION $DATE "Starting FileFighter"
ffstart
exit 0
fi
if [[ $1 == "stop" ]]; then
echoLogo $VERSION $DATE "Stopping FileFighter"
ffstop
exit 0
fi
if [[ $1 == "remove" ]]; then
echoLogo $VERSION $DATE "Removing FileFighter"
ffremove
exit 0
fi
if [[ $1 == "update" ]]; then
echoLogo $VERSION $DATE "Updating FileFighter"
ffupdate
exit 0
fi
echoLogo $VERSION $DATE "Show Usage"
printUsage
exit 1