|
|
@ -30,9 +30,6 @@ do_install_detail() {
|
|
|
|
[ -z "$port" ] && port=5000
|
|
|
|
[ -z "$port" ] && port=5000
|
|
|
|
[ -z "$IMAGE_NAME" ] && IMAGE_NAME=benbusby/whoogle-search
|
|
|
|
[ -z "$IMAGE_NAME" ] && IMAGE_NAME=benbusby/whoogle-search
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Create Docker Compose file with custom variables
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Create Docker Compose file with custom variables
|
|
|
|
# Create Docker Compose file with custom variables
|
|
|
|
rm -R /opt/docker2/compose/whoogle-app
|
|
|
|
rm -R /opt/docker2/compose/whoogle-app
|
|
|
|
mkdir /opt/docker2/compose/whoogle-app
|
|
|
|
mkdir /opt/docker2/compose/whoogle-app
|
|
|
@ -130,7 +127,13 @@ case ${ACTION} in
|
|
|
|
docker ${ACTION} whoogle
|
|
|
|
docker ${ACTION} whoogle
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
"status")
|
|
|
|
"status")
|
|
|
|
docker ps --all -f 'name=whoogle' --format '{{.State}}'
|
|
|
|
CONTAINER_NAME=$(docker ps -a --filter "name=whoogle-search" --format '{{.Names}}')
|
|
|
|
|
|
|
|
CONTAINER_STATUS=$(docker ps --all --filter "name=${CONTAINER_NAME}" --format '{{.Status}}' | awk '/^Up/ { print "up " substr($0, 4) } !/^Up/ && /.+/ { print "down" }')
|
|
|
|
|
|
|
|
if [ -z "$CONTAINER_NAME" ]; then
|
|
|
|
|
|
|
|
echo "Whoogle is not installed"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "${CONTAINER_STATUS}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
"port")
|
|
|
|
"port")
|
|
|
|
docker ps --all -f 'name=whoogle' --format '{{.Ports}}' | grep -om1 '0.0.0.0:[0-9]*' | sed 's/0.0.0.0://'
|
|
|
|
docker ps --all -f 'name=whoogle' --format '{{.Ports}}' | grep -om1 '0.0.0.0:[0-9]*' | sed 's/0.0.0.0://'
|
|
|
|