#!/bin/sh ACTION=${1} shift 1 get_image() { IMAGE_NAME=$(uci get gotify.@gotify[0].image_name 2>/dev/null) } do_install_detail() { local config=$(uci get gotify.@gotify[0].config_path 2>/dev/null) local port=$(uci get gotify.@gotify[0].port 2>/dev/null) local IMAGE_NAME=$(uci get gotify.@gotify[0].image_name 2>/dev/null) local username=$(uci get gotify.@gotify[0].username 2>/dev/null) local password=$(uci get gotify.@gotify[0].password 2>/dev/null) LAN_IP=$(uci get network.lan.ipaddr) LAN_IP="${LAN_IP%/*}" if [ -z "$config" ]; then echo "config path is empty!" exit 1 fi [ -z "$port" ] && port=8050 [ -z "$IMAGE_NAME" ] && IMAGE_NAME=gotify/server rm -R /opt/docker2/compose/gotify-app mkdir /opt/docker2/compose/gotify-app touch /opt/docker2/compose/gotify-app/docker-compose.yml cat > /opt/docker2/compose/gotify-app/docker-compose.yml <