Good catch - I must have taken the regular items when i got fed up earlier, and not from this thread. Sorry!
Still hanging though, though the script gets a ton further.
root@olivetin:/config# /config/pluto-for-channels.sh "hostname:8089" "latest" "7780" "7777" "local,us_east" "4500"
+ dvr=hostname:8089
++ basename /config/pluto-for-channels.sh
+ extension=pluto-for-channels.sh
+ extension=pluto-for-channels
+ cp /config/pluto-for-channels.env /tmp
+ envFile=/tmp/pluto-for-channels.env
+ extensionURL=hostname:7780
+ [[ 4500 == \# ]]
+ cdvrStartingChannel=4500
+ [[ -n 4500 ]]
+ cdvrIgnoreM3UNumbers=ignore
+ curl -s -o /dev/null http://hostname:7780
+ envVars=("TAG=$2" "HOST_PORT=$3" "PLUTO_PORT=$4" "PLUTO_CODE=$5" "CDVR_STARTING_CHANNEL=$6")
+ printf '%s\n' TAG=latest HOST_PORT=7780 PLUTO_PORT=7777 PLUTO_CODE=local,us_east CDVR_STARTING_CHANNEL=4500
+ sed -i /=#/d /tmp/pluto-for-channels.env
+ /config/portainerstack.sh pluto-for-channels
+ stackName=pluto-for-channels
+ portainerHost=hostname
+ curl -s -o /dev/null http://hostname:9000
+ portainerURL='https://hostname:9443/api/stacks?type=2&method=string&endpointId=2'
+ portainerToken=correct
+ cp /config/pluto-for-channels.yaml /tmp
+ stackFile=/tmp/pluto-for-channels.yaml
+ envFile=/tmp/pluto-for-channels.env
++ grep DVR_SHARE= /tmp/pluto-for-channels.env
++ grep -v /
++ awk -F= '{print $2}'
+ dockerVolume=
++ grep VOL_EXTERNAL= /tmp/pluto-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeExternal=
++ grep VOL_NAME= /tmp/pluto-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeName=
+ [[ -n '' ]]
++ awk '{printf "%s\\n", $0}' /tmp/pluto-for-channels.yaml
++ sed 's/"/\\"/g'
+ stackContent='version: '\''3.9'\''\nservices:\n # GitHub home for this project with setup instructions: https://github.com/jgomez177/pluto-for-channels\n # Docker container home for this project: https://ghcr.io/jgomez177/pluto-for-channels\n pluto-for-channels:\n image: ghcr.io/jgomez177/pluto-for-channels:${TAG}\n container_name: pluto-for-channels\n ports:\n - ${HOST_PORT}:${PLUTO_PORT} # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n environment:\n - PLUTO_PORT=${PLUTO_PORT}\n - PLUTO_CODE=${PLUTO_CODE} # ALLOWED_COUNTRY_CODES: us_east - United States East Coast, us_west - United States West Coast, local - Local IP address Geolocation, ca - Canada, uk - United Kingdom,\n restart: unless-stopped\n\n # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n'
+ stackEnvVars='['
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},{"name": "CDVR_STARTING_CHANNEL", "value": "4500"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},{"name": "CDVR_STARTING_CHANNEL", "value": "4500"}]'
++ cat
+ stackJSON='{
"Name": "pluto-for-channels",
"SwarmID": "",
"StackFileContent": "version: '\''3.9'\''\nservices:\n # GitHub home for this project with setup instructions: https://github.com/jgomez177/pluto-for-channels\n # Docker container home for this project: https://ghcr.io/jgomez177/pluto-for-channels\n pluto-for-channels:\n image: ghcr.io/jgomez177/pluto-for-channels:${TAG}\n container_name: pluto-for-channels\n ports:\n - ${HOST_PORT}:${PLUTO_PORT} # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n environment:\n - PLUTO_PORT=${PLUTO_PORT}\n - PLUTO_CODE=${PLUTO_CODE} # ALLOWED_COUNTRY_CODES: us_east - United States East Coast, us_west - United States West Coast, local - Local IP address Geolocation, ca - Canada, uk - United Kingdom,\n restart: unless-stopped\n\n # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
"Env": [{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},{"name": "CDVR_STARTING_CHANNEL", "value": "4500"}]
}'
+ curl -k -X POST -H 'Content-Type: application/json' -H 'X-API-Key: correct=' -d '{
"Name": "pluto-for-channels",
"SwarmID": "",
"StackFileContent": "version: '\''3.9'\''\nservices:\n # GitHub home for this project with setup instructions: https://github.com/jgomez177/pluto-for-channels\n # Docker container home for this project: https://ghcr.io/jgomez177/pluto-for-channels\n pluto-for-channels:\n image: ghcr.io/jgomez177/pluto-for-channels:${TAG}\n container_name: pluto-for-channels\n ports:\n - ${HOST_PORT}:${PLUTO_PORT} # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n environment:\n - PLUTO_PORT=${PLUTO_PORT}\n - PLUTO_CODE=${PLUTO_CODE} # ALLOWED_COUNTRY_CODES: us_east - United States East Coast, us_west - United States West Coast, local - Local IP address Geolocation, ca - Canada, uk - United Kingdom,\n restart: unless-stopped\n\n # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
"Env": [{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},{"name": "CDVR_STARTING_CHANNEL", "value": "4500"}]
}' 'https://hostname:9443/api/stacks?type=2&method=string&endpointId=2'
curl: (28) Failed to connect to hostname port 9443: Connection timed out