File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -257,24 +257,30 @@ function module_wireguard () {
257257 fi
258258 ;;
259259 " ${commands[6]} " )
260- local image=$( docker image ls -a | mawk ' /wireguard?( |$)/{print $3}' )
260+ if pkg_installed docker-ce; then
261+ local image=$( docker image ls -a | mawk ' /wireguard?( |$)/{print $3}' )
262+ fi
261263 if [[ " ${image} " ]]; then
262264 return 0
263265 else
264266 return 1
265267 fi
266268 ;;
267269 " ${commands[7]} " )
268- local container=$( docker container ls -a | mawk ' /wireguard?( |$)/{print $1}' )
270+ if pkg_installed docker-ce; then
271+ local container=$( docker container ls -a | mawk ' /wireguard?( |$)/{print $1}' )
272+ fi
269273 if [[ " ${container} " ]]; then
270274 return 0
271275 else
272276 return 1
273277 fi
274278 ;;
275279 " ${commands[8]} " )
276- local container=$( docker container ls -a | mawk ' /wireguard?( |$)/{print $1}' )
277- local image=$( docker image ls -a | mawk ' /wireguard?( |$)/{print $3}' )
280+ if pkg_installed docker-ce; then
281+ local container=$( docker container ls -a | mawk ' /wireguard?( |$)/{print $1}' )
282+ local image=$( docker image ls -a | mawk ' /wireguard?( |$)/{print $3}' )
283+ fi
278284 if [[ " ${container} " && " ${image} " && -f " ${WIREGUARD_BASE} /config/wg_confs/wg0.conf" ]]; then
279285 return 0
280286 else
You can’t perform that action at this time.
0 commit comments