forked from localhosthack0r/kingofsat2satip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SetupVLC.sh
15 lines (14 loc) · 1.07 KB
/
SetupVLC.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
IP=$(/sbin/ip route | awk '/default/ { print $3 }')
echo your router ip adress is $IP
echo aplly config for VLC on this computer TIP: install before by package manager
newurl=satip-channellist-url=http://$IP/Master.m3u
oldurl=satip-channellist-url=http://*/Master.m3u
emptyurl=satip-channellist-url=
sed 's/#satip-channelist=/satip-channelist=/g' ~/.config/vlc/vlcrc > /tmp/vlcrc && mv /tmp/vlcrc ~/.config/vlc/vlcrc
sed 's/satip-channelist=Auto/satip-channelist=/g' ~/.config/vlc/vlcrc > /tmp/vlcrc && mv /tmp/vlcrc ~/.config/vlc/vlcrc
sed 's/satip-channelist=/satip-channelist=CustomList/g' ~/.config/vlc/vlcrc > /tmp/vlcrc && mv /tmp/vlcrc ~/.config/vlc/vlcrc
sed 's/#satip-channellist-url=/satip-channellist-url=/g' ~/.config/vlc/vlcrc > /tmp/vlcrc && mv /tmp/vlcrc ~/.config/vlc/vlcrc
sed --expression "s@$emptyurl@$newurl@" ~/.config/vlc/vlcrc > /tmp/vlcrc && mv /tmp/vlcrc ~/.config/vlc/vlcrc
sed --expression "s@$oldurl@$newurl@" ~/.config/vlc/vlcrc > /tmp/vlcrc && mv /tmp/vlcrc ~/.config/vlc/vlcrc
echo THIS IS ONLY NEED TO RUN ONCE IF OPENWRT ROUTER IP WAS NOT CHANGED