Re: Apache2 Need Help

General Forum talking area for H series TVs.
Post Reply

Natas
Posts: 9
Joined: Sun Jan 10, 2016 4:54 am
Location: ARGAB 118 & sometimes in YOUR World

Apache2 Need Help

Post by Natas »

hello,

i need some info btw. some help with apache2.

- were i can find the apache2 config ?
- is this the file httpd.conf i have to edit ?
- can i edit the apache config without lost samy root ?
- have the samsung tv H-Series cronjob / crontab ?
- were i can find the crontab config file ?

if you asking why do i want to know this?

I'm working on an app that I want to share with you the next days.

the last missing piece is an m3u8 file callable in the app, which should update itself automatically
or manually with this script:
SpoilerShow

Code: Select all

#!/bin/bash

#
#
#
# Run everything as root !
#
# Install Apache2:
#
# apt install apache2
# mkdir /mnt/var/www/html/live/
# a2enmod rewrite && systemctl restart apache2
#
# save this script in /mnt/etc/init.d/01_20_vavoo.init.dis
# make the file 777. open putty and paste following
#
# chmod 777 /mnt/etc/init.d/01_20_vavoo.init.dis
#
# to activate script, delete .dis file ending after install
#
#
# In the apache2 config file      /etc/apache2/apache2.conf 
# change under                    <Directory /var/www/>
# the line                        AllowOverride none 
# change to                       AllowOverride all !
#
# Call cronjob with (root) crontab  */15 * * * * /Path to script!
#
#
#
#
#
#

### url details
  url1="https://www2.v****.to/live2/index"
  url2="https://www.v****.tv/api/box/ping2"
  datei="/mnt/var/www/html/live/Germany.m3u8" # YOU HAVE TO Make DIR /mnt/var/www/html/live/
  my_server="192.168.1.100" #Change to match IP from your TV.
### download file
  wget -q --timeout=30 --no-check-certificate --user-agent="V****/2.6" $url1 -O list1
  authkey=$(curl -fs --location --request POST $url2 --header 'Content-Type: application/json' --data "{\"vec\": \"9frjpx*****************"}" | sed 's#^.*"signed":"##' | sed "s#\"}}##g")
### create file
  cat list1 | grep -i -A1 'group-title="Germany"'  | sed -e "/--/d" -e "1 i \#EXTM3U" -e "/^\#EXTINF/a \#EXTVLCOPT:http-user-agent=V****/2.6" -e "s/[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}:8008\/a\/willene/"$my_server"/"  > $datei
  cat list1 | grep -i -A1 'group-title="Germany"'  | grep 'http:' > list2
  cat list2 | sed -e "s/http:\/\/[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}:8008\/a\/willene\/live\///" -e "s/\..*//" > list3
### redirect adresses
  rm /mnt/var/www/html/live/.htaccess
  while read -r id; do
    url3=$(grep $id < list2)
    echo 'Redirect 302 /live/'$id'.ts '$url3'?n=1&b=5&va****_auth='$authkey >> /mnt/var/www/html/live/.htaccess
  done < list3
### clean up
  rm list*
#
#
#

need help,
that the script should then be displayed here: http://YOUR_TV_IP:1080/cgi-bin/test.cgi

need help,
that the user should also be able to start and stop the script in a web browser
displayed here:
http://YOUR_TV_IP:1080/cgi-bin/test.cgi

the addon is already finished, but that's the last piece that is missing!'
-----------
copy the script to:
/mnt/etc/init.d/01_20_vavoo.init
and make it 777

Code: Select all

chmod 777 /mnt/etc/init.d/01_20_vavoo.init
-----------



Can somebody from the mods or devs help me to solve it, please?!


Attachment:

01_20_vavoo.init best regards

maybee also interesting for the nice app from @wluczykijwf

---edit---

i can start the sript in www browser with

Code: Select all

http://192.168.1.100:1080/cgi-bin/test.cgi?/mnt/etc/init.d/01_20_vavoo.init+start
but the generated file is unfortunately emty... :(

were is the mistake?

i have to edit

#
# In the apache2 config file
#
# change the line AllowOverride none
# change to AllowOverride all !
#

but i do not know were to find apache config file....

The change in the apache2.conf file is important so that forwarding via .htaccess works at all

N E E D H E L P!!!! :idea:
Last edited by Natas on Tue Apr 04, 2023 6:26 pm, edited 1 time in total.
SamyGo TV UE48 H-6270-SS - T-MST14DEUC-2130.0 / SmartHub Apps-Version: 6.1441
DietPi (DNS & PiHole)
Natas
Posts: 9
Joined: Sun Jan 10, 2016 4:54 am
Location: ARGAB 118 & sometimes in YOUR World

Re: Apache2 Need Help

Post by Natas »

i edit the file httpd.conf in DIR

Code: Select all

/mnt/etc/apache2
i change in httpd.conf in line:20

Code: Select all

<Directory "/dtv/www">
	Options Indexes FollowSymLinks
	#AllowOverride None
	AllowOverride All
	Order allow,deny
	Allow from all
</Directory>

AllowOverride None
to
AllowOverride All

in DIR

Code: Select all

/mnt/etc/init.d
i edit the script file 01_20_vavoo.init

i can start and stop the script now with a web browser:

Code: Select all

http://192.168.1.100:1080/cgi-bin/test.cgi

Code: Select all

http://192.168.1.100:1080/cgi-bin/test.cgi?/mnt/etc/init.d/01_20_vavoo.init+start

Code: Select all

http://192.168.1.100:1080/cgi-bin/test.cgi?/mnt/etc/init.d/01_20_vavoo.init+stop
when you start the tv,
or start or stop the script
then
a playlist is then created in DIR

Code: Select all

/mnt/var/www/html/live/Germany.m3u8

Code: Select all

/dtv/www/html/live/Germany.m3u8
also in DIR

Code: Select all

/dtv/cgi-bin
the needed lists
"list2 and list3" is created there, but the lists are emty and the playlist Germany.m3u8 is emty, too.

list1 is missing in wget in the script
and i do not know how to solve my mission!!!

error log displayed in www browser

Code: Select all

http://192.168.1.100:1080/cgi-bin/test.cgi

Code: Select all

/mnt/etc/init.d/01_20_vavoo.init

Status:
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
cat: can't open 'list1': No such file or directory
cat: can't open 'list1': No such file or directory
rm: can't remove '/dtv/www/html/live/.htaccess': No such file or directory

is there anyone here who would like to help me?
SamyGo TV UE48 H-6270-SS - T-MST14DEUC-2130.0 / SmartHub Apps-Version: 6.1441
DietPi (DNS & PiHole)
Natas
Posts: 9
Joined: Sun Jan 10, 2016 4:54 am
Location: ARGAB 118 & sometimes in YOUR World

Re: Re: Apache2 Need Help

Post by Natas »

nobody there, really?
no respond in the "free forum"?
Mmmhhhh....!
SamyGo TV UE48 H-6270-SS - T-MST14DEUC-2130.0 / SmartHub Apps-Version: 6.1441
DietPi (DNS & PiHole)
Natas
Posts: 9
Joined: Sun Jan 10, 2016 4:54 am
Location: ARGAB 118 & sometimes in YOUR World

Re: Re: Apache2 Need Help

Post by Natas »

hello,
little update:

now i get all the shit running.

within your pc webbrowser, open the URL
SpoilerShow
http://YOUR-TV-IP:1080/cgi-bin/test.cgi [/spoiler=]
you can see your "start / stop" .init files what you have installed on the TV.
so i make a start | stop script
SpoilerShow
#! /bin/sh
#
#
# SCRIPTNAME=/mnt/etc/init.d/01_20_iptv.init
# start/stop the IPTV-Server
# Default Start 2 3 4 5
# Default Stop 0 1 6
#
# start and stop with your webbrowser.
# http://YOUR_IP:1080/cgi-bin/test.cgi
#
# http://192.168.1.100:1080/cgi-bin/test. ... init+start
#
# http://192.168.1.100:1080/cgi-bin/test. ... .init+stop
#

PGM_DIR='/dtv/www/live/' #####
SCRIPT='iptv_redirect' ####

PID=$(ps aux | grep 'ptv_redirect' | sed 's/^root *\([0-9]*\).*$/\1/') #####

case "$1" in

start) if [ "$PID" = "" ]; then
echo "Starting Service IPTV"
$PGM_DIR$SCRIPT RunAsService &>/dev/null &
else
echo "Service IPTV already running, nothing to do"
fi
;;
stop) if [ "$PID" = "" ]; then
echo "Service IPTV is not running, nothing to do"
else
echo "Terminating Service IPTV"
kill 9 "$PID" &>/dev/null
fi
;;
restart) $0 stop
$0 start
;;
status) echo -n "Service IPTV is "
if [ "$PID" = "" ]; then
echo -n "not "
fi
echo "running"
;;
*) echo "Usage: /mnt/etc/init.d/01_20_iptv.init {start|stop|restart|status}" #####
;;
esac
exit [/spoiler=]

and placed the script in the tv folder /mnt/etc/init.d/

the start | stop script is a "RunAsService" script
and run then
the script "iptv_redirect", placed in /dtv/www/live/
that means, that you have a runnimg webserver on your TV, and a automatic generated playlist.
and
in the "iptv_redirect" script, you can change county and the ip of your TV.
when you start the script with your webbrowser or with putty
and the response is correct, the you can have a 15 countries TV m3u8 playlist
with "http://your-ip-from-tv:1080/live/*m3u8" and you can also stream the playlist in your local network and open it on your pc with VLC or firetv addons.

also in my mind is,
that you can open the streams with the widget / app
from @wluczykijwf
[App] More TV channels on E/F/H series


from @wluczykijwf
i whant to know: " where i can change the "useragent" in your widget?

.... mmhh.. maybee somebody can help me or leave a comment!° :)

Image

best regards
The Brother From Another Mother
Last edited by Natas on Fri May 05, 2023 2:46 pm, edited 1 time in total.
SamyGo TV UE48 H-6270-SS - T-MST14DEUC-2130.0 / SmartHub Apps-Version: 6.1441
DietPi (DNS & PiHole)

Post Reply

Return to “[H] General”