Redhat系でのmpd起動スクリプトです。サウンドカードかUSBを選択して起動します。
#!/bin/sh
POINT=`ps aux | grep mpd | grep mpd.conf | grep -v "grep" | ¥
awk '{print $12}' | sed 's/¥/etc¥///g' | awk -F"." '{print $1}'`
#
if [ -z $POINT ]
then
echo "停止中"
echo ""
echo "$POINT"
#
else
echo ""
echo "起動中 終了します。"
ps aux | grep mpd | grep mpd.conf | grep -v "grep"
echo ""
#
exit
fi
#############################
echo ""
echo "Choose 1:USB or 2:M-Audio"
echo ""
read ch
#echo $ch
case "$ch" in
[1])
echo ""
echo "1: USB"
mpd /etc/mpd2.conf
echo ""
#
;;
[2])
echo ""
echo "2: M-Audio"
mpd /etc/mpd.conf
echo ""
#
echo ""
;;
esac
echo "終了しました!"
ps aux | grep mpd | grep mpd.conf | grep -v "grep" | awk '{print $12}' | sed 's/¥/etc¥///g' | awk -F"." '{print $1}'
ps aux | grep mpd | grep mpd2.conf | grep -v "grep" | awk '{print $12}' | sed 's/¥/etc¥///g' | awk -F"." '{print $1}'
この記事に対するコメントはありません
Comments