Module: tools Branch: master Commit: 12ea02c6d59b39fb40f3e67ea4d0116d3c4c95c2 URL: http://source.winehq.org/git/tools.git/?a=commit;h=12ea02c6d59b39fb40f3e67ea...
Author: Francois Gouget fgouget@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"