summaryrefslogtreecommitdiffstats
path: root/instfiles
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2007-02-03 23:09:08 +0000
committerjsorg71 <jsorg71>2007-02-03 23:09:08 +0000
commitb611452d6be2b186ae536168d5a322d0707643bb (patch)
tree16d0ee4a59ca06675dcec7da822833c40d371786 /instfiles
parent079879db1815c1ec6ade2fcd5ccab5d1ba5a4cf4 (diff)
downloadxrdp-proprietary-b611452d6be2b186ae536168d5a322d0707643bb.tar.gz
xrdp-proprietary-b611452d6be2b186ae536168d5a322d0707643bb.zip
xrdp_control.sh is a bash script
Diffstat (limited to 'instfiles')
-rwxr-xr-xinstfiles/xrdp_control.sh84
-rw-r--r--instfiles/xrdp_control1.sh84
2 files changed, 92 insertions, 76 deletions
diff --git a/instfiles/xrdp_control.sh b/instfiles/xrdp_control.sh
index 7c586d9a..92ad3006 100755
--- a/instfiles/xrdp_control.sh
+++ b/instfiles/xrdp_control.sh
@@ -1,6 +1,8 @@
-#!/bin/sh
+#!/bin/bash
+# this needs to be a bash script, the first line needs to be #!/bin/bash
# xrdp control script
# Written : 1-13-2006 - Mark Balliet - posicat@pobox.com
+# maintaned by Jay Sorg
# chkconfig: 2345 11 89
# description: starts xrdp
@@ -39,55 +41,61 @@ check_up () {
# Cleanup : If sesman isn't running, but the pid exists, erase it.
if [ "$sesup" == "" ]
then
- if [ -e /var/run/sesman.pid ] ; then rm /var/run/sesman.pid ; fi
+ if [ -e /var/run/sesman.pid ]
+ then
+ rm /var/run/sesman.pid
+ fi
fi
# Cleanup : If xrdp isn't running, but the pid exists, erase it.
if [ "$xrdpup" == "" ]
then
- if [ -e /var/run/xrdp.pid ] ; then rm /var/run/xrdp.pid ; fi
+ if [ -e /var/run/xrdp.pid ]
+ then
+ rm /var/run/xrdp.pid
+ fi
fi
}
case "$1" in
start)
- check_up
- if [ "$xrdpup" != "" ]
- then
- echo "Xrdp is already loaded"
- exit 1
- fi
- if [ "$sesup" != "" ]
- then
- echo "sesman is already loaded"
- exit 1
- fi
- xrdp_start
- ;;
+ check_up
+ if [ "$xrdpup" != "" ]
+ then
+ echo "Xrdp is already loaded"
+ exit 1
+ fi
+ if [ "$sesup" != "" ]
+ then
+ echo "sesman is already loaded"
+ exit 1
+ fi
+ xrdp_start
+ ;;
stop)
- check_up
- if [ "$xrdpup" == "" ]
- then
- echo "xrdp is not loaded."
- fi
- if [ "$sesup" == "" ]
- then
- echo "sesman is not loaded."
- fi
- xrdp_stop
- ;;
+ check_up
+ if [ "$xrdpup" == "" ]
+ then
+ echo "xrdp is not loaded."
+ fi
+ if [ "$sesup" == "" ]
+ then
+ echo "sesman is not loaded."
+ fi
+ xrdp_stop
+ ;;
force-reload|restart)
- check_up
- echo "Restarting Xrdp ..."
- xrdp_stop
- while [ "$xrdpup" != "" ]; do
- check_up
- sleep 1
- done
- xrdp_start
- ;;
+ check_up
+ echo "Restarting Xrdp ..."
+ xrdp_stop
+ while [ "$xrdpup" != "" ]; do
+ check_up
+ sleep 1
+ done
+ xrdp_start
+ ;;
*)
- echo "Usage: xrdp_control.sh {start|stop|restart|force-reload}"
- exit 1
+ echo "Usage: xrdp_control.sh {start|stop|restart|force-reload}"
+ exit 1
esac
exit 0
diff --git a/instfiles/xrdp_control1.sh b/instfiles/xrdp_control1.sh
index 398efc4b..aede7c0d 100644
--- a/instfiles/xrdp_control1.sh
+++ b/instfiles/xrdp_control1.sh
@@ -1,7 +1,9 @@
-#!/bin/sh
+#!/bin/bash
+# this needs to be a bash script, the first line needs to be #!/bin/bash
# xrdp control script
# same as xrdp_control.sh except the XRDP_DIR is /usr/lib/xrdp
# Written : 1-13-2006 - Mark Balliet - posicat@pobox.com
+# maintaned by Jay Sorg
# chkconfig: 2345 11 89
# description: starts xrdp
@@ -40,55 +42,61 @@ check_up () {
# Cleanup : If sesman isn't running, but the pid exists, erase it.
if [ "$sesup" == "" ]
then
- if [ -e /var/run/sesman.pid ] ; then rm /var/run/sesman.pid ; fi
+ if [ -e /var/run/sesman.pid ]
+ then
+ rm /var/run/sesman.pid
+ fi
fi
# Cleanup : If xrdp isn't running, but the pid exists, erase it.
if [ "$xrdpup" == "" ]
then
- if [ -e /var/run/xrdp.pid ] ; then rm /var/run/xrdp.pid ; fi
+ if [ -e /var/run/xrdp.pid ]
+ then
+ rm /var/run/xrdp.pid
+ fi
fi
}
case "$1" in
start)
- check_up
- if [ "$xrdpup" != "" ]
- then
- echo "Xrdp is already loaded"
- exit 1
- fi
- if [ "$sesup" != "" ]
- then
- echo "sesman is already loaded"
- exit 1
- fi
- xrdp_start
- ;;
+ check_up
+ if [ "$xrdpup" != "" ]
+ then
+ echo "Xrdp is already loaded"
+ exit 1
+ fi
+ if [ "$sesup" != "" ]
+ then
+ echo "sesman is already loaded"
+ exit 1
+ fi
+ xrdp_start
+ ;;
stop)
- check_up
- if [ "$xrdpup" == "" ]
- then
- echo "xrdp is not loaded."
- fi
- if [ "$sesup" == "" ]
- then
- echo "sesman is not loaded."
- fi
- xrdp_stop
- ;;
+ check_up
+ if [ "$xrdpup" == "" ]
+ then
+ echo "xrdp is not loaded."
+ fi
+ if [ "$sesup" == "" ]
+ then
+ echo "sesman is not loaded."
+ fi
+ xrdp_stop
+ ;;
force-reload|restart)
- check_up
- echo "Restarting Xrdp ..."
- xrdp_stop
- while [ "$xrdpup" != "" ]; do
- check_up
- sleep 1
- done
- xrdp_start
- ;;
+ check_up
+ echo "Restarting Xrdp ..."
+ xrdp_stop
+ while [ "$xrdpup" != "" ]; do
+ check_up
+ sleep 1
+ done
+ xrdp_start
+ ;;
*)
- echo "Usage: xrdp_control.sh {start|stop|restart|force-reload}"
- exit 1
+ echo "Usage: xrdp_control.sh {start|stop|restart|force-reload}"
+ exit 1
esac
exit 0