]>
Commit | Line | Data |
---|---|---|
bb7300c7 | 1 | #!/bin/sh |
2 | # | |
3 | # xfs: Starts the X Font Server | |
4 | # | |
cc00956b | 5 | # Version: $Revision$ |
bb7300c7 | 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 | ||
17 | # See how we were called. | |
18 | case "$1" in | |
19 | start) | |
20 | # Check if the service is already running? | |
21 | if [ ! -f /var/lock/subsys/xfs ]; then | |
22 | show Starting X Font Server | |
23 | rm -fr /tmp/.font-unix | |
24 | daemon xfs -droppriv -daemon -port -1 | |
25 | else | |
26 | echo "X Font Server already is running" | |
27 | fi | |
28 | touch /var/lock/subsys/xfs | |
29 | ;; | |
30 | stop) | |
31 | show Shutting down X Font Server | |
32 | killproc xfs | |
33 | rm -f /var/lock/subsys/xfs | |
34 | ;; | |
35 | status) | |
36 | status xfs | |
37 | ;; | |
38 | restart) | |
39 | $0 stop | |
40 | $0 start | |
41 | ;; | |
42 | reload) | |
43 | if [ -f /var/lock/subsys/xfs ]; then | |
44 | show "Reload X Font Server configuration" | |
45 | killproc xfs -USR1 | |
46 | deltext; | |
47 | ok; | |
48 | else | |
49 | echo "Reload X Font Server not runed" | |
50 | fi | |
51 | ;; | |
52 | *) | |
53 | echo "*** Usage: xfs {start|stop|status|restart|reload}" | |
54 | exit 1 | |
55 | esac | |
56 | ||
57 | exit 0 |