From 68de13120c4773c0f6cbcf36a05ed8bf433b6034 Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Wed, 15 Sep 2004 17:07:25 +0000 Subject: [PATCH] - TiMidity-alsaseq init script and sysconfig file Changed files: timidity.init -> 1.1 timidity.sysconfig -> 1.1 --- timidity.init | 58 ++++++++++++++++++++++++++++++++++++++++++++++ timidity.sysconfig | 7 ++++++ 2 files changed, 65 insertions(+) create mode 100644 timidity.init create mode 100644 timidity.sysconfig diff --git a/timidity.init b/timidity.init new file mode 100644 index 0000000..a538961 --- /dev/null +++ b/timidity.init @@ -0,0 +1,58 @@ +#!/bin/sh +# +# timidity TiMidity++ software MIDI synthesizer for ALSA. +# +# chkconfig: 2345 89 12 +# description: TiMidity++ is a software synthesizer. On this mode, TiMidity +# works purely as the software real-time MIDI render, that is as +# a software MIDI synth engine on ALSA. +# + +# Source function library +. /etc/rc.d/init.d/functions + +# Get service config +TIMIDITY_OPTIONS="" +[ -f /etc/sysconfig/timidity ] && . /etc/sysconfig/timidity + +RETVAL=0 +# See how we were called. +case "$1" in + start) + # Check if the service is already running? + if [ ! -f /var/lock/subsys/timidity ]; then + msg_starting "TiMidity++ software MIDI synthesizer" + modprobe snd_seq 2>/dev/null + modprobe snd_seq_oss 2>/dev/null + daemon timidity -iAD -Os $TIMIDITY_OPTIONS + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/timidity + else + msg_already_running "TiMidity++ software MIDI synthesizer" + fi + ;; + stop) + # Stop daemons. + if [ -f /var/lock/subsys/timidity ]; then + msg_stopping "TiMidity++ software MIDI synthesizer" + killproc timidity + rm -f /var/lock/subsys/timidity >/dev/null 2>&1 + else + msg_not_running "TiMidity++ software MIDI synthesizer" + fi + ;; + status) + status timidity + exit $? + ;; + reload|force-reload|restart) + $0 stop + $0 start + RETVAL=$? + ;; + *) + msg_usage "$0 {start|stop|restart|reload|force-reload|status}" + exit 3 +esac + +exit $RETVAL diff --git a/timidity.sysconfig b/timidity.sysconfig new file mode 100644 index 0000000..e94bd32 --- /dev/null +++ b/timidity.sysconfig @@ -0,0 +1,7 @@ +# Customized settings for TiMidity + +# Define nice level for TiMidity +SERVICE_RUN_NICE_LEVEL="+5" + +# Extra options for TiMidity +TIMIDITY_OPTIONS="-B2,8 -q0/0 -k0" -- 2.43.0