mpc 自动启动并播放 url 3 systemd

mpc 自动启动并播放 url 3 systemd

内容/etc/systemd/system/mpc.autostart.service

[Unit] Description=Music Player Client-Auto Start-Agent

[Service] Type=forking ExecStart=/usr/bin/mpd start && /usr/bin/mpc start && /usr/bin/mpc play 3 ExecReload=/usr/bin/mpd start && /usr/bin/mpc start && /usr/bin/mpc play 3 ExecStop=/usr/bin/mpd stop && /usr/bin/mpc stop RemainAfterExit=yes

[Install] WantedBy=multi-user.target

内容/usr/bin/mpc.autostart

start() {    
   exec usr/bin/mpc start    
   exec usr/bin/mpc play 3 
}

stop() {      
   exec usr/bin/mpc stop 
}

case $1 in  start|stop) "$1" ;;esac

我也跑过:

sudo systemctl enable mpc.autostart.service

Created symlink from /etc/systemd/system/multi-user.target.wants/mpc.autostart.service to 

/etc/systemd/system/mpc.autostart.service.

然而它无法运行。

systemctl

lightdm.service           loaded active     running         Light Display Mana 
mpc.autostart.service     loaded failed     failed          Music Player Clien  
mpd-autoplay.service      loaded active     exited          LSB: Ensures that        
mpd.service               loaded active     running         Music Player Daemo

答案1

我现在已经完成了 mpc 客户端,因为它的效果不是很好。

现在我使用的是 VLC 2.2.1 Terry Pratchett,并且我仅通过 http:// 流式传输内容

亲切的问候

相关内容