apt-get install mpd libmpdclient2 libmpdclient-dev mkdir /home/radio/mpd/playlists > /home/radio/mpd/tag_cache chmod 777 /home/radio/mpd -R cd /home/radio/mpd git clone ********** cd ympd/src; mkdir -p build; cd build cmake ../.. -DCMAKE_INSTALL_PREFIX_PATH=/usr make make install mv /etc/mpd.conf /etc/mpd.default nano /etc/mpd.conf
music_directory "/home/radio/mpd/music" playlist_directory "/home/radio/mpd/playlists" db_file "/home/radio/mpd/tag_cache" log_file "/home/radio/mpd/mpd.log" pid_file "/home/radio/mpd/pid" state_file "/home/radio/mpd/state" sticker_file "/home/radio/mpd/sticker.sql" user "radio" bind_to_address "localhost" port "6600" log_level "default" restore_paused "no" save_absolute_paths_in_playlists "no" auto_update "yes" default_permissions "read,add,control,admin" audio_output { type "shout" encoding "mp3" name "Test MPD Stream" host "localhost" port "8000" mount "/mpd" password "пароль" bitrate "128" format "44100:16:1" protocol "icecast2" user "source" description "Test MPD Stream" url "ваш url" genre "various" public "no" timeout "2" mixer_type "software" } filesystem_charset "UTF-8" id3v1_encoding "UTF-8"
service mpd restart
ympd -w 8888
htdigest -c /home/radio/mpd/.htdigest ympd <имя пользователя>
-c
ympd -d "/home/radio/mpd/.htdigest" -w 8888
ympd -d "/home/radio/mpd/.htdigest" -w "ssl://8888:<полный путь к файлу сертификата>"
apt-get install daemon
echo '#!/bin/sh ympd -d "/home/radio/mpd/.htdigest" -w "ssl://8888:<путь к сертификату>"' > '/home/radio/mpd/ympd_start.sh'; chmod +x "/home/radio/mpd/ympd_start.sh"
echo -e '#!/bin/sh ps -ef | grep -v grep | grep ympd | awk \x27{print $2}\x27 | xargs kill -9' > '/home/radio/mpd/ympd_stop.sh'; chmod +x "/home/radio/mpd/ympd_stop.sh"
daemon sh "/home/radio/mpd/ympd_start.sh"
ps -ef | grep -v grep | grep ympd