From 08c62814627797888712e79a01dc4c7186ddd421 Mon Sep 17 00:00:00 2001 From: Jan Losinshi Date: Wed, 27 Aug 2008 23:15:16 +0200 Subject: [PATCH] bugs --- Makefile | 2 +- debian/init.d | 2 +- debian/patches/01-runner_paths.patch | 2 +- debian/rules | 2 +- xerxes.conf | 4 ++-- xerxes_runner.rb | 7 +++++-- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 40d68a6..d652287 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ BINDIR=/usr/bin/ CONFDIR=/etc/ $(BIN): $(OBJECTS) - g++ -o $(BIN) $(OBJECTS) -Wall -pedantic -ggdb -lboost_regex -lboost_program_options + g++ -o $(BIN) $(OBJECTS) -Wall -pedantic -O3 -lboost_regex -lboost_program_options all: $(BIN) diff --git a/debian/init.d b/debian/init.d index c881ecf..fceb2b0 100644 --- a/debian/init.d +++ b/debian/init.d @@ -9,7 +9,7 @@ # PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/xerxes_runner.rb +DAEMON=/usr/bin/xerxes_runner.rb NAME=xerxes DESC=xerxes diff --git a/debian/patches/01-runner_paths.patch b/debian/patches/01-runner_paths.patch index bef1c26..71ccb2d 100755 --- a/debian/patches/01-runner_paths.patch +++ b/debian/patches/01-runner_paths.patch @@ -15,7 +15,7 @@ diff -Nrup a/xerxes_runner.rb b/xerxes_runner.rb -@config_file="xerxes.conf" -@bin_name="./xerxes" +@config_file="/etc/xerxes.conf" -+@bin_name="/usr/sbin/xerxes" ++@bin_name="/usr/bin/xerxes" @log = Syslog.open('xerxes') diff --git a/debian/rules b/debian/rules index 28c3925..ace700f 100755 --- a/debian/rules +++ b/debian/rules @@ -83,7 +83,7 @@ binary-arch: build install # dh_installpam # dh_installmime # dh_python -# dh_installinit + dh_installinit # dh_installcron # dh_installinfo dh_installman diff --git a/xerxes.conf b/xerxes.conf index 60cf4f4..e774943 100644 --- a/xerxes.conf +++ b/xerxes.conf @@ -1,3 +1,3 @@ #tcp:127.0.0.1:13338 tcp:localhost:3306 quiet debug -tcp:127.0.0.1:13338 tcp:localhost:3306 quiet -unix:testfile tcp:localhost:3306 quiet +tcp:127.0.0.1:13338 tcp:anyhost:3306 quiet +unix:/var/run/mysqld/mysqld.sock tcp:anyhost:3306 quiet diff --git a/xerxes_runner.rb b/xerxes_runner.rb index 12d59e3..ffa00ea 100755 --- a/xerxes_runner.rb +++ b/xerxes_runner.rb @@ -2,8 +2,11 @@ require 'syslog' -@config_file="xerxes.conf" -@bin_name="./xerxes" +@config_file="/etc/xerxes.conf" +@bin_name="/usr/bin/xerxes" + +Process.exit! if (!File.exist?(@bin_name)) +Process.exit! if (!File.exist?(@config_file)) @log = Syslog.open('xerxes')