Thanks CharlieBrady.
Thats what I thought.
However supervise/runit is giving me difficulty.
I'm attempting to run a program(mpg123) at startup using supervise(runit)
So far I have,
Created directory
/var/service/mpg123
and
/var/service/mpg123/log
In the newly created directories placed a run file consisting of
#!/bin/sh
exec 2>&1
exec /usr/sbin/mpg123 /root/music.mp3
and
#!/bin/sh
#----------------------------------------------------------------------
# copyright (C) 1999-2003 Mitel Networks Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Technical support for this program is available from Mitel Networks
# Please visit our web site www.mitel.com for details.
#----------------------------------------------------------------------
exec \
/usr/local/bin/setuidgid smelog \
/usr/local/bin/multilog t s5000000 \
/var/log/mpg123
I also created
/var/log/mpg123
I created a db entry
db configuration set mpg123 service status enabled
and the following symbolic links
ln -s /var/service/mpg123 /service/mpg123
ln -s /etc/rc.d/init.d/daemontools /etc/rc.d/init.d/supervise/mpg123
and finally
ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S98mpg123
The result of
/etc/rc7.d/S98mpg123 start
is
Starting mpg123: [ OK ]
yet there is no sound.
So, what have I left out?
Do I still need a init script?
What signal-event's should I be doing?
BTW,
/usr/sbin/mpg123 /root/music.mp3
does produce music.
[root@tiger ~]# /usr/sbin/mpg123 /root/music.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 0.60; written and copyright by Michael Hipp and others
free software (LGPL/GPL) without any warranty but with best wishes
Directory: /root/
Playing MPEG stream 1 of 1: music.mp3 ...
[id3.c:198] error: ID3v2: non-syncsafe frame size, aborting
Title: My Life
Artist: Billy Joel
Album: Greatest Hits Vol.1 & 2 [UK] Disc 2
Year:
Genre: Rock/Pop
Comment:
MPEG 1.0 layer III, 128 kbits/s, 44100 Hz joint-stereo
The desire to do this started
here and
here.