I think I redacted all personal information:
root@olivetin:/config# ./frndlytv-for-channels.sh "192.168.0.155:8089" "latest" "8183" "#" "[Redacted]" "[Redacted]" "7000"
+ dvr=192.168.0.155:8089
++ basename ./frndlytv-for-channels.sh
+ extension=frndlytv-for-channels.sh
+ extension=frndlytv-for-channels
+ cp /config/frndlytv-for-channels.env /tmp
+ envFile=/tmp/frndlytv-for-channels.env
+ [[ -n 192.168.0.155 ]]
+ extensionURL=192.168.0.155:8183
+ streamLimit=
+ [[ 7000 == \# ]]
+ cdvrStartingChannel=7000
+ [[ -n 7000 ]]
+ cdvrIgnoreM3UNumbers=ignore
+ [[ -n 7000 ]]
+ cdvrStartingChannel2=7100
+ curl -s -o /dev/null http://192.168.0.155:8183
+ envVars=("TAG=$2" "HOST_PORT=$3" "IP=$4" "USERNAME=$5" "PASSWORD=$6")
+ printf '%s\n' TAG=latest HOST_PORT=8183 IP=# USERNAME=[Redacted] PASSWORD=[Redacted]
+ sed -i /=#/d /tmp/frndlytv-for-channels.env
+ /config/portainerstack.sh frndlytv-for-channels
+ stackName=frndlytv-for-channels
+ portainerHost=192.168.0.155
+ curl -s -o /dev/null http://192.168.0.155:9000
+ portainerURL='https://192.168.0.155:9443/api/stacks?type=2&method=string&endpointId=2'
+ portainerToken=[Redacted]
+ cp /config/frndlytv-for-channels.yaml /tmp
+ stackFile=/tmp/frndlytv-for-channels.yaml
+ envFile=/tmp/frndlytv-for-channels.env
++ grep DVR_SHARE= /tmp/frndlytv-for-channels.env
++ grep -v /
++ awk -F= '{print $2}'
+ dockerVolume=
++ grep VOL_EXTERNAL= /tmp/frndlytv-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeExternal=
++ grep VOL_NAME= /tmp/frndlytv-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeName=
+ [[ -n '' ]]
++ awk '{printf "%s\\n", $0}' /tmp/frndlytv-for-channels.yaml
++ sed 's/"/\\"/g'
+ stackContent='version: '\''3.9'\''\nservices:\n # GitHub home for this project: https://github.com/matthuisman/frndlytv-for-channels\n # Matt Huisman'\''s webpage for this project: https://www.matthuisman.nz/2021/11/frndly-tv-for-channels.html\n # Docker Hub home for this project: https://hub.docker.com/r/matthuisman/frndlytv-for-channels\n frndlytv-for-channels:\n image: matthuisman/frndlytv-for-channels:${TAG}\n container_name: frndlytv-for-channels\n ports:\n - ${HOST_PORT}:80\n environment:\n - IP=${IP} # For Geo-locating FrndlyTV to a different area\n - USERNAME=${USERNAME} # FrndlyTV username (the email you used to sign-up)\n - PASSWORD=${PASSWORD} # FrndlyTV password (the password you chose when you signed-up)\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": "8183"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8183"},{"name": "USERNAME", "value": "[Redacted]"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8183"},{"name": "USERNAME", "value": "[Redacted]"},{"name": "PASSWORD", "value": "[Redacted]"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8183"},{"name": "USERNAME", "value": "[Redacted]"},{"name": "PASSWORD", "value": "[Redacted]"}]'
++ cat
+ stackJSON='{
"Name": "frndlytv-for-channels",
"SwarmID": "",
"StackFileContent": "version: '\''3.9'\''\nservices:\n # GitHub home for this project: https://github.com/matthuisman/frndlytv-for-channels\n # Matt Huisman'\''s webpage for this project: https://www.matthuisman.nz/2021/11/frndly-tv-for-channels.html\n # Docker Hub home for this project: https://hub.docker.com/r/matthuisman/frndlytv-for-channels\n frndlytv-for-channels:\n image: matthuisman/frndlytv-for-channels:${TAG}\n container_name: frndlytv-for-channels\n ports:\n - ${HOST_PORT}:80\n environment:\n - IP=${IP} # For Geo-locating FrndlyTV to a different area\n - USERNAME=${USERNAME} # FrndlyTV username (the email you used to sign-up)\n - PASSWORD=${PASSWORD} # FrndlyTV password (the password you chose when you signed-up)\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": "8183"},{"name": "USERNAME", "value": "[Redacted]"},{"name": "PASSWORD", "value": "[Redacted]"}]
}'
+ echo 'JSON response from https://192.168.0.155:9443/api/stacks?type=2&method=string&endpointId=2:'
JSON response from https://192.168.0.155:9443/api/stacks?type=2&method=string&endpointId=2:
++ curl -k -X POST -H 'Content-Type: application/json' -H 'X-API-Key: [Redacted]' -d '{
"Name": "frndlytv-for-channels",
"SwarmID": "",
"StackFileContent": "version: '\''3.9'\''\nservices:\n # GitHub home for this project: https://github.com/matthuisman/frndlytv-for-channels\n # Matt Huisman'\''s webpage for this project: https://www.matthuisman.nz/2021/11/frndly-tv-for-channels.html\n # Docker Hub home for this project: https://hub.docker.com/r/matthuisman/frndlytv-for-channels\n frndlytv-for-channels:\n image: matthuisman/frndlytv-for-channels:${TAG}\n container_name: frndlytv-for-channels\n ports:\n - ${HOST_PORT}:80\n environment:\n - IP=${IP} # For Geo-locating FrndlyTV to a different area\n - USERNAME=${USERNAME} # FrndlyTV username (the email you used to sign-up)\n - PASSWORD=${PASSWORD} # FrndlyTV password (the password you chose when you signed-up)\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": "8183"},{"name": "USERNAME", "value": "[Redacted]"},{"name": "PASSWORD", "value": "[Redacted]"}]
}' 'https://192.168.0.155:9443/api/stacks?type=2&method=string&endpointId=2'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:21 --:--:-- 0
curl: (7) Failed to connect to 192.168.0.155 port 9443: Connection refused
+ portainerResponse=
+ echo
+ echo ''
+ jq -e '.Id != null'
+ exit 0
+ [[ 0 == 1 ]]
++ tr -d '\n'
+++ customChannels
+++ cat
++ echo -n '{
"name": "FrndlyTV",
"type": "HLS",
"source": "URL",
"url": "http://192.168.0.155:8183/playlist.m3u8?gracenote=include",
"text": "",
"refresh": "24",
"limit": "",
"satip": "",
"numbering": "ignore",
"start_number": "7000",
"logos": "",
"xmltv_url": "",
"xmltv_refresh": "3600"
}'
+ customChannelsJSON='{ "name": "FrndlyTV", "type": "HLS", "source": "URL", "url": "http://192.168.0.155:8183/playlist.m3u8?gracenote=include", "text": "", "refresh": "24", "limit": "", "satip": "", "numbering": "ignore", "start_number": "7000", "logos": "", "xmltv_url": "", "xmltv_refresh": "3600"}'
+++ customChannels2
+++ cat
++ tr -d '\n'
++ echo -n '{
"name": "FrndlyTV-NoEPG",
"type": "HLS",
"source": "URL",
"url": "http://192.168.0.155:8183/playlist.m3u8?gracenote=exclude",
"text": "",
"refresh": "24",
"limit": "",
"satip": "",
"numbering": "ignore",
"start_number": "7100",
"logos": "",
"xmltv_url": "http://192.168.0.155:8183/epg.xml?gracenote=exclude",
"xmltv_refresh": "3600"
}'
+ customChannelsJSON2='{ "name": "FrndlyTV-NoEPG", "type": "HLS", "source": "URL", "url": "http://192.168.0.155:8183/playlist.m3u8?gracenote=exclude", "text": "", "refresh": "24", "limit": "", "satip": "", "numbering": "ignore", "start_number": "7100", "logos": "", "xmltv_url": "http://192.168.0.155:8183/epg.xml?gracenote=exclude", "xmltv_refresh": "3600"}'
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
+ true
+ curl -s -o /dev/null 192.168.0.155:8183
+ [[ -n '' ]]
+ sleep 5
^C
root@olivetin:/config#
curl: (7) Failed to connect to 192.168.0.155 port 9443: Connection refused
It's funny because I'm interacting with Portainer now in the browser with the URL: 127.0.0.1:9000. If I try with the actual IP 192.168.0.155:9000, it doesn't load.
If I go to 127.0.0.1:9443, I get this:
Maybe when DOMAIN is "local", the IP address to use should be 127.0.0.1?