Module: tools
Branch: master
Commit: 12ea02c6d59b39fb40f3e67ea4d0116d3c4c95c2
URL: http://source.winehq.org/git/tools.git/?a=commit;h=12ea02c6d59b39fb40f3e67e…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Oct 29 15:53:38 2012 +0100
testbot/scripts: Remove the hardcoded path and username.
Instead, fail if they are not set and tell the user to either put them
in the script or in the standard /etc/default directory.
---
testbot/scripts/initd | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/testbot/scripts/initd b/testbot/scripts/initd
index bffc26d..262fa54 100755
--- a/testbot/scripts/initd
+++ b/testbot/scripts/initd
@@ -33,8 +33,18 @@
# Description: Start winetestbot to start job processing
### END INIT INFO
-USER="winehq"
-WTB_ROOT="/home/winehq/tools/testbot"
+USER=
+WTB_ROOT=
+if [ \( -z "$USER" -o -z "$WTB_ROOT" \) -a -f "/etc/default/winetestbot" ]
+then
+ . /etc/default/winetestbot
+fi
+if [ -z "$USER" -o -z "$WTB_ROOT" ]
+then
+ echo "Set the username and WineTestBot root in the init.d script or in /etc/default/winetestbot" >&2
+ exit 1
+fi
+
DAEMON="$WTB_ROOT/bin/Engine.pl"
PING="$WTB_ROOT/bin/PingEngine.pl"
PIDFILE="/var/run/winetestbot.pid"
Module: tools
Branch: master
Commit: 832b73319b718d85a19130a16efda41b43676177
URL: http://source.winehq.org/git/tools.git/?a=commit;h=832b73319b718d85a19130a1…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Oct 29 15:53:16 2012 +0100
testbot/scripts: Fix a stray reference to the winetest user and group.
Remove the reference to the group entirely.
---
testbot/scripts/initd | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/testbot/scripts/initd b/testbot/scripts/initd
index 0424174..bffc26d 100755
--- a/testbot/scripts/initd
+++ b/testbot/scripts/initd
@@ -159,7 +159,7 @@ then
echo -n "Starting WineTestBot "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
- /sbin/startproc -u winetest -g winetest $DAEMON
+ /sbin/startproc -u $USER $DAEMON
# Remember status and be verbose
rc_status -v
Module: tools
Branch: master
Commit: cad268f24209cb5e85ae4d8d1594113511ae2218
URL: http://source.winehq.org/git/tools.git/?a=commit;h=cad268f24209cb5e85ae4d8d…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Oct 29 15:53:06 2012 +0100
testbot/scripts: Print error messages on stderr.
---
testbot/scripts/initd | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/testbot/scripts/initd b/testbot/scripts/initd
index 9d3e8b1..0424174 100755
--- a/testbot/scripts/initd
+++ b/testbot/scripts/initd
@@ -112,7 +112,7 @@ then
;;
*)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" >&2
exit 1
;;
esac
@@ -179,7 +179,7 @@ then
## Note: try-restart is now part of LSB (as of 1.9).
## RH has a similar command named condrestart.
if test "$1" = "condrestart"; then
- echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+ echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
@@ -210,7 +210,7 @@ then
;;
status)
status_of_proc $DAEMON
-echo -n "Checking for service WineTestBot "
+ echo -n "Checking for service WineTestBot "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
@@ -230,7 +230,7 @@ echo -n "Checking for service WineTestBot "
rc_status -v
;;
*)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" >&2
exit 1
;;
esac
@@ -238,6 +238,6 @@ echo -n "Checking for service WineTestBot "
else
- echo "WineTestBot does not know how to start on this system"
+ echo "WineTestBot does not know how to start on this system" >&2
exit 1
fi