Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
radio_mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
azbyka
radio_mpd
Commits
55216e57
Commit
55216e57
authored
Jan 28, 2019
by
Andrey Shatokhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed paths in radio.sh
parent
84846eed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
radio.sh
radio.sh
+15
-16
No files found.
radio.sh
View file @
55216e57
...
...
@@ -7,7 +7,6 @@
# - процесс автоматически добавляется в systemd
# - управление потоком ./radio.sh <название>
# Со стороны пользователя остается лишь добавить пути к плейлистам и изменить конфиг по усмотрению(название трансляции,описание и т.д)
ICECAST_DIR
=
/home/icecastradio
source
./.port
if
[[
$#
-lt
1
]]
;
then
...
...
@@ -15,20 +14,20 @@ if [[ $# -lt 1 ]]; then
exit
1
fi
if
[[
!
-f
$ICECAST_DIR
'/'
$1
.mpd.conf
]]
;
then
cp
-p
$ICECAST_DIR
'/'
template.mpd.conf
$ICECAST_DIR
'/'
$1
.mpd.conf
mkdir
$ICECAST_DIR
'/'
$1
touch
$ICECAST_DIR
'/'
$1
'/'
mpd.log
touch
$ICECAST_DIR
'/'
$1
'/'
mpdstate
touch
$ICECAST_DIR
'/'
$1
'/'
mpd.db
touch
$ICECAST_DIR
'/'
$1
'/'
mpd.pid
mkdir
$ICECAST_DIR
'/'
$1
'/'
playlists
sed
-i
"s/#1/
$1
/g"
$ICECAST_DIR
'/'
$1
.mpd.conf
sed
-i
"s/#2/
$PORT
/g"
$ICECAST_DIR
'/'
$1
.mpd.conf
chown
-R
icecastradio
$ICECAST_DIR
'/'
$1
chgrp
-R
icecastradio
$ICECAST_DIR
'/'
$1
chmod
-R
777
$ICECAST_DIR
'/'
$1
chmod
+x
$ICECAST_DIR
'/'
$1
/playlists
if
[[
!
-f
.
'/'
$1
.mpd.conf
]]
;
then
cp
-p
.
'/'
template.mpd.conf .
'/'
$1
.mpd.conf
mkdir
.
'/'
$1
touch
.
'/'
$1
'/'
mpd.log
touch
.
'/'
$1
'/'
mpdstate
touch
.
'/'
$1
'/'
mpd.db
touch
.
'/'
$1
'/'
mpd.pid
mkdir
.
'/'
$1
'/'
playlists
sed
-i
"s/#1/
$1
/g"
.
'/'
$1
.mpd.conf
sed
-i
"s/#2/
$PORT
/g"
.
'/'
$1
.mpd.conf
chown
-R
icecastradio
.
'/'
$1
chgrp
-R
icecastradio
.
'/'
$1
chmod
-R
777
.
'/'
$1
chmod
+x
.
'/'
$1
/playlists
echo
"Файлы конфигураций cозданы успешно !"
cp
template.service /etc/systemd/system
'/'
$1
.service
sed
-i
"s/#1/
$1
/g"
/etc/systemd/system
'/'
$1
.service
...
...
@@ -40,7 +39,7 @@ if [[ ! -f $ICECAST_DIR'/'$1.mpd.conf ]];then
echo
"Для начала работы требуется обновить базу данных mpd"
echo
"Для работа с потоком : ./radio <название потока>"
else
ncmpc
-p
`
cat
$ICECAST_DIR
'/'
$1
.mpd.conf |
grep
port |
awk
'{ print $2 ; exit; }'
|
tr
-d
\"
`
ncmpc
-p
`
cat
.
'/'
$1
.mpd.conf |
grep
port |
awk
'{ print $2 ; exit; }'
|
tr
-d
\"
`
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment