]>
Commit | Line | Data |
---|---|---|
5716bf05 | 1 | #!/bin/sh |
2 | # | |
3 | # xfs: Starts the X Font Server | |
4 | # | |
d99acf33 | 5 | # Version: $Revision$ |
5716bf05 | 6 | # |
7 | # chkconfig: 345 90 10 | |
8 | # description: Starts and stops the X Font Server at boot time and shutdown. | |
9 | # | |
10 | # processname: xfs | |
11 | # config: /etc/X11/fs/config | |
12 | # hide: true | |
13 | ||
14 | # Source function library. | |
15 | . /etc/rc.d/init.d/functions | |
16 | ||
91d01143 | 17 | # Get service config |
18 | if [ -f /etc/sysconfig/xfs ] ; then | |
19 | . /etc/sysconfig/xfs | |
20 | fi | |
21 | ||
5716bf05 | 22 | # See how we were called. |
23 | case "$1" in | |
24 | start) | |
25 | # Check if the service is already running? | |
26 | if [ ! -f /var/lock/subsys/xfs ]; then | |
ce48ad5a | 27 | msg_starting "X Font Server" |
5716bf05 | 28 | rm -fr /tmp/.font-unix |
91d01143 | 29 | daemon xfs \ |
30 | $([ -n "$XFS_PORT" ] && echo "-port $XFS_PORT") \ | |
ce48ad5a | 31 | $([ -n "$XFS_OPTIONS" ] && echo "$XFS_OPTIONS") |
5716bf05 | 32 | else |
2b52a414 | 33 | msg_already_running "X Font Server" |
5716bf05 | 34 | fi |
35 | touch /var/lock/subsys/xfs | |
36 | ;; | |
37 | stop) | |
ce48ad5a | 38 | msg_stopping "X Font Server" |
5716bf05 | 39 | killproc xfs |
40 | rm -f /var/lock/subsys/xfs | |
41 | ;; | |
42 | status) | |
43 | status xfs | |
44 | ;; | |
45 | restart) | |
46 | $0 stop | |
47 | $0 start | |
48 | ;; | |
49 | reload) | |
50 | if [ -f /var/lock/subsys/xfs ]; then | |
170cf6c0 | 51 | msg_reloading "X Font Server" |
5716bf05 | 52 | killproc xfs -USR1 |
5716bf05 | 53 | else |
2b52a414 | 54 | msg_not_running "X Font Server" |
5716bf05 | 55 | fi |
56 | ;; | |
57 | *) | |
2b52a414 | 58 | msg_usage "$0 {start|stop|status|restart|reload}" |
5716bf05 | 59 | exit 1 |
60 | esac | |
61 | ||
62 | exit 0 |