Rename files,small fix and add stop.sh
This commit is contained in:
parent
4edc2cff2e
commit
35cf3796e1
10
run.sh
Executable file
10
run.sh
Executable file
@ -0,0 +1,10 @@
|
||||
while :
|
||||
do
|
||||
wget https://nashe1.hostingradio.ru:18000/nashepunks.mp3 &
|
||||
th1=$!
|
||||
|
||||
sleep 30m
|
||||
kill -9 $th1
|
||||
|
||||
python3 up.py
|
||||
done
|
5
stop.sh
Executable file
5
stop.sh
Executable file
@ -0,0 +1,5 @@
|
||||
kl=$(ps aux | grep run.sh | grep bin | awk -F " " '{print $2}')
|
||||
kill $kl
|
||||
killall wget
|
||||
rm *.mp3
|
||||
rm nohup.out
|
11
up.py
11
up.py
@ -8,8 +8,9 @@ files = listdir()
|
||||
for i in files:
|
||||
tim = today.strftime("%d.%m.%Y_"+time.strftime("%H:%M", time.localtime()))
|
||||
|
||||
tp = i[i.find('.') + 1:]
|
||||
if tp == "mp3":
|
||||
ss("telegram-upload "+i+" --to https://t.me/streamsradio --caption "+tim)
|
||||
ss("mkdir "+tim)
|
||||
ss("mv "+i+" "+tim+"/")
|
||||
#Check type,no need for this
|
||||
#tp = i[i.find('.') + 1:]
|
||||
if i == "nashepunks.mp3":
|
||||
ss("telegram-upload "+i+" --to https://t.me/getnetradio_nashe0punk --caption "+tim)
|
||||
ss("mkdir ARCHIVE/"+tim)
|
||||
ss("mv "+i+" ARCHIVE/"+tim+"/")
|
||||
|
Loading…
Reference in New Issue
Block a user