File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 33# support user renaming of script
44SCRIPT=$( basename " $0 " )
55
6+ # dependency check
7+ if [ -z " $( which rsync) " -o -z " $( which jq) " ] ; then
8+ echo " This script depends on jq and rsync. Please run"
9+ echo " sudo apt update && sudo apt install jq rsync"
10+ exit -1
11+ fi
12+
613# useful function
714isContainerRunning () {
815 if STATUS=$( curl -s --unix-socket /var/run/docker.sock http://localhost/containers/$1 /json | jq .State.Status) ; then
@@ -17,6 +24,13 @@ isContainerRunning() {
1724# should not run as root
1825[ " $EUID " -eq 0 ] && echo " $SCRIPT should NOT be run using sudo" && exit -1
1926
27+ # dependency check
28+ if [ -z " $( which rsync) " -o -z " $( which jq) " ] ; then
29+ echo " This script depends on jq and rsync. Please run"
30+ echo " sudo apt update && sudo apt install jq rsync"
31+ exit -1
32+ fi
33+
2034read -r -d ' ' RUNNINGNOTES << -EOM
2135\n
2236===============================================================================
You can’t perform that action at this time.
0 commit comments