summaryrefslogtreecommitdiff
path: root/package/xdm
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2012-04-03 17:05:25 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2012-04-03 17:05:25 +0200
commitb9cc51c4c2c315f508459cea7da1d8433333d7a1 (patch)
tree8c621f3331662c6c21d07c48d17dfb1e86722e02 /package/xdm
parent6a71d6abfeda9e27a904dae851201d9d0b454978 (diff)
lemote addons, like pdf viewer
Diffstat (limited to 'package/xdm')
-rw-r--r--package/xdm/files/xdm.init31
-rw-r--r--package/xdm/files/xdm.postinst3
2 files changed, 34 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 $?
diff --git a/package/xdm/files/xdm.postinst b/package/xdm/files/xdm.postinst
new file mode 100644
index 000000000..be112629e
--- /dev/null
+++ b/package/xdm/files/xdm.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf xdm xdm YES