Update 'root/usr/libexec/apps/searxng/searxng.sh'

main
ben 1 year ago
parent 8063730c69
commit 1581ac08b4

@ -36,13 +36,13 @@ do_install_detail() {
# Create Docker Compose file with custom variables # Create Docker Compose file with custom variables
# Create Docker Compose file with custom variables # Create Docker Compose file with custom variables
touch docker-compose.yml touch /root/docker-compose/searxng-app/docker-compose.yml
cat > docker-compose.yml <<EOF cat > /root/docker-compose/searxng-app/docker-compose.yml <<EOF
version: '3.7' version: '3.7'
services: services:
searxng: searxng:
image: paulgoio/searxng:production image: $IMAGE_NAME
restart: always restart: always
ports: ports:
- ${LAN_IP}:$port:8080 - ${LAN_IP}:$port:8080
@ -67,7 +67,7 @@ services:
plugsy.link: "http://${LAN_IP}:$port" plugsy.link: "http://${LAN_IP}:$port"
EOF EOF
docker-compose up -d dockerdeploy searxng-app
# Add a new list option to the "shortcutmenu" configuration file # Add a new list option to the "shortcutmenu" configuration file
uci add shortcutmenu lists uci add shortcutmenu lists
@ -98,16 +98,21 @@ case ${ACTION} in
do_install_detail do_install_detail
;; ;;
"rm") "rm")
docker ps -a --filter "$IMAGE_NAME" --format '{{.ID}}' | xargs -r docker stop && docker ps -a --filter "$IMAGE_NAME" --format '{{.ID}}' | xargs -r docker rm && docker rmi $IMAGE_NAME
docker rm -f searxng docker rm -f searxng
;; ;;
"start" | "stop" | "restart") "start" | "stop" | "restart")
docker ${ACTION} searxng CONTAINER_IDS=$(docker ps -a --filter "ancestor=${IMAGE_NAME}" --format '{{.ID}}')
docker ${ACTION} ${ID}
;; ;;
"status") "status")
docker ps --all -f 'name=searxng' --format '{{.State}}' CONTAINER_NAMES=$(docker ps -a --filter "ancestor=${IMAGE_NAME}" --format '{{.Names}}')
docker ps --all -f "name=${NAME}" --format '{{.Status}}'
;; ;;
"port") "port")
docker ps --all -f 'name=searxng' --format '{{.Ports}}' | grep -om1 '0.0.0.0:[0-9]*' | sed 's/0.0.0.0://' CONTAINER_NAMES=$(docker ps -a --filter "ancestor=${IMAGE_NAME}" --format '{{.Names}}')
docker ps --all -f "name=${NAME}" --format '{{.Ports}}' | grep -om1 '0.0.0.0:[0-9]*' | sed 's/0.0.0.0://'
;; ;;
*) *)
usage usage

Loading…
Cancel
Save