File: init.d

package info (click to toggle)
xfstt 1.7-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,560 kB
  • ctags: 1,239
  • sloc: cpp: 8,437; sh: 4,124; makefile: 105; sed: 16
file content (85 lines) | stat: -rw-r--r-- 1,642 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/sh
#
# $Id: init.d 73 2006-11-05 17:47:19Z guillem $
#
### BEGIN INIT INFO
# Provides:          xfs xfstt
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs $network
# Should-Start:
# Should-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: xfstt sysv init script
# Description:       xfstt is a TrueType font server for X
### END INIT INFO
#
# Written by
# Stephen Carpenter <sjc@debian.org>,
# Gergely Egervary <mauzi@lin.lkg.c3.hu> and
# Guillem Jover <guillem@debian.org>.
#

PATH=/bin:/usr/bin:/sbin:/usr/sbin
XFSTT=/usr/bin/xfstt
DESC="X font server"
PIDFILE=/var/run/xfstt.pid
CONFIGFILE=/etc/default/xfstt

# To change the default port and/or user modify and uncomment
portno=7101
newuser=nobody
#portarg="--port $portno"
#userarg="--user $newuser"

daemon="--daemon"

ARGS="$daemon $portarg $userarg"

test -x "$XFSTT" || exit 0

if [ -e $CONFIGFILE ]; then
	. $CONFIGFILE
else
	LISTEN_TCP=no
fi

if [ "$LISTEN_TCP" = no ]; then
	ARGS="$ARGS --notcp"
fi

. /lib/lsb/init-functions

case "$1" in
    start)
	log_daemon_msg "Starting $DESC" "xfstt"
	start-stop-daemon --start --quiet --pidfile $PIDFILE \
		--exec $XFSTT -- $ARGS
	log_end_msg $?
    ;;

    stop)
	log_daemon_msg "Stopping $DESC" "xfstt"
	start-stop-daemon --stop --quiet --pidfile $PIDFILE \
		--exec $XFSTT
	log_end_msg $?
    ;;

    force-reload|restart)
	$0 stop
	log_action_begin_msg "Reloading $DESC configuration"
	$XFSTT --sync >/dev/null
	log_action_end_msg $?
	$0 start
    ;;

    *)
	echo "Usage: /etc/init.d/xfstt {start|stop|force-reload|restart}"
	exit 1
    ;;
esac

exit 0

# vim: syn=sh: