diff options
Diffstat (limited to 'package/xdm/files/xdm.init')
-rw-r--r-- | package/xdm/files/xdm.init | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/package/xdm/files/xdm.init b/package/xdm/files/xdm.init new file mode 100644 index 000000000..1bcce7df5 --- /dev/null +++ b/package/xdm/files/xdm.init @@ -0,0 +1,31 @@ +#!/bin/sh +#PKG xdm +#INIT 99 + +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${xdm:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + if [ ! -d /var/lib/xdm ];then + mkdir -p /var/lib/xdm + fi + xdm + ;; +stop) + kill $(pgrep -f /usr/bin/xdm) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? |