#!/bin/sh ACTION=${1} shift 1 get_image() { IMAGE_NAME=$(uci get seafile.@seafile[0].image_name 2>/dev/null) } do_install_detail() { local config=$(uci get seafile.@seafile[0].config_path 2>/dev/null) local port=$(uci get seafile.@seafile[0].port 2>/dev/null) local IMAGE_NAME=$(uci get seafile.@seafile[0].image_name 2>/dev/null) local username=$(uci get seafile.@seafile[0].username 2>/dev/null) local password=$(uci get seafile.@seafile[0].password 2>/dev/null) GEN_PASS=$(< /dev/urandom tr -dc A-Za-z0-9 2>/dev/null | head -c14; echo) GEN_PASS2=$(< /dev/urandom tr -dc A-Za-z0-9 2>/dev/null | head -c14; echo) LAN_IP=$(uci get network.lan.ipaddr) LAN_IP="${LAN_IP%/*}" [ -z "$config" ] && { echo "config path is empty!"; exit 1; } [ -z "$port" ] && port=8160 [ -z "$IMAGE_NAME" ] && IMAGE_NAME="seafileltd/seafile-mc:latest" rm -R /opt/docker2/compose/seafile-app mkdir /opt/docker2/compose/seafile-app create_docker_compose_file docker_compose_action configure_shortcut_menu } create_docker_compose_file() { touch /opt/docker2/compose/seafile-app/docker-compose.yml cat > /opt/docker2/compose/seafile-app/docker-compose.yml <