]> git.pld-linux.org Git - packages/TiMidity++.git/blame - timidity.init
- versioned timidity* Obsoletes, dropped bogus TiMidity++ Obsoletes
[packages/TiMidity++.git] / timidity.init
CommitLineData
68de1312
JK
1#!/bin/sh
2#
3# timidity TiMidity++ software MIDI synthesizer for ALSA.
4#
5# chkconfig: 2345 89 12
6# description: TiMidity++ is a software synthesizer. On this mode, TiMidity
7# works purely as the software real-time MIDI render, that is as
8# a software MIDI synth engine on ALSA.
9#
10
11# Source function library
12. /etc/rc.d/init.d/functions
13
14# Get service config
15TIMIDITY_OPTIONS=""
16[ -f /etc/sysconfig/timidity ] && . /etc/sysconfig/timidity
17
18RETVAL=0
19# See how we were called.
20case "$1" in
21 start)
22 # Check if the service is already running?
23 if [ ! -f /var/lock/subsys/timidity ]; then
24 msg_starting "TiMidity++ software MIDI synthesizer"
25 modprobe snd_seq 2>/dev/null
26 modprobe snd_seq_oss 2>/dev/null
27 daemon timidity -iAD -Os $TIMIDITY_OPTIONS
28 RETVAL=$?
29 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/timidity
30 else
31 msg_already_running "TiMidity++ software MIDI synthesizer"
32 fi
33 ;;
34 stop)
35 # Stop daemons.
36 if [ -f /var/lock/subsys/timidity ]; then
37 msg_stopping "TiMidity++ software MIDI synthesizer"
38 killproc timidity
39 rm -f /var/lock/subsys/timidity >/dev/null 2>&1
40 else
41 msg_not_running "TiMidity++ software MIDI synthesizer"
42 fi
43 ;;
44 status)
45 status timidity
46 exit $?
47 ;;
48 reload|force-reload|restart)
49 $0 stop
50 $0 start
51 RETVAL=$?
52 ;;
53 *)
54 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
55 exit 3
56esac
57
58exit $RETVAL
This page took 0.096808 seconds and 4 git commands to generate.