Commit e4d183a5 authored by Andrey Shatokhin's avatar Andrey Shatokhin

fixed radio.sh

parent 55216e57
...@@ -30,7 +30,7 @@ if [[ ! -f .'/'$1.mpd.conf ]];then ...@@ -30,7 +30,7 @@ if [[ ! -f .'/'$1.mpd.conf ]];then
chmod +x .'/'$1/playlists chmod +x .'/'$1/playlists
echo "Файлы конфигураций cозданы успешно !" echo "Файлы конфигураций cозданы успешно !"
cp template.service /etc/systemd/system'/'$1.service cp template.service /etc/systemd/system'/'$1.service
sed -i "s/#1/$1/g" /etc/systemd/system'/'$1.service sed -i "s/#1/`pwd`/$1.mpd.conf/g" /etc/systemd/system'/'$1.service
echo PORT=$((PORT+1)) > ./.port echo PORT=$((PORT+1)) > ./.port
systemctl daemon-reload systemctl daemon-reload
systemctl start $1.service systemctl start $1.service
......
...@@ -6,7 +6,7 @@ ConditionFileIsExecutable=/usr/bin/mpd ...@@ -6,7 +6,7 @@ ConditionFileIsExecutable=/usr/bin/mpd
Type=simple Type=simple
StartLimitInterval=5 StartLimitInterval=5
StartLimitBurst=10 StartLimitBurst=10
ExecStart=/usr/bin/mpd --no-daemon /home/icecastradio/#1.mpd.conf ExecStart=/usr/bin/mpd --no-daemon #1
User=icecastradio User=icecastradio
Group=icecastradio Group=icecastradio
...@@ -14,4 +14,4 @@ Restart=always ...@@ -14,4 +14,4 @@ Restart=always
RestartSec=20 RestartSec=20
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment