author | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
commit | 15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff) | |
tree | c2fa0399a2c47fda8e2cd0092c73a809d17f68eb /etc/init.d/qpe | |
download | opie-15318cad33835e4e2dc620d033e43cd930676cdd.zip opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2 |
Initial revision
-rwxr-xr-x | etc/init.d/qpe | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/etc/init.d/qpe b/etc/init.d/qpe new file mode 100755 index 0000000..12bb1df --- a/dev/null +++ b/etc/init.d/qpe | |||
@@ -0,0 +1,39 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | |||
4 | export LOGNAME=root | ||
5 | export HOME=/$LOGNAME | ||
6 | export QWS_DISPLAY=Transformed:Rot270:0 | ||
7 | export QTDIR=/usr | ||
8 | export QPEDIR=/opt/QtPalmtop | ||
9 | if [ ! -x $QPEDIR/bin/qpe ] ; then exit 0 ; fi | ||
10 | |||
11 | $QPEDIR/bin/qpe-reorgfiles | ||
12 | |||
13 | . /etc/profile | ||
14 | |||
15 | killproc() { | ||
16 | pid=`/bin/ps -e | /bin/sed -n -e '/\<'$1'\>/ s/^ *\([0-9][0-9]*\).*/\1/p'` | ||
17 | [ "$pid" != "" ] && kill $pid | ||
18 | } | ||
19 | |||
20 | case $1 in | ||
21 | 'start') | ||
22 | echo "Starting QPE..." | ||
23 | |||
24 | cd $HOME | ||
25 | |||
26 | rm -f /etc/rc2.d/S99x # Can't have both running! | ||
27 | |||
28 | $QPEDIR/bin/qpe 2>/dev/null >/dev/null & | ||
29 | |||
30 | ;; | ||
31 | 'stop') | ||
32 | echo "Killing QPE..." | ||
33 | killproc qpe | ||
34 | ;; | ||
35 | *) | ||
36 | echo "usage: $0 { start | stop }" | ||
37 | ;; | ||
38 | esac | ||
39 | |||