From 8f64bfdab71db0b38e4b5a149d56a565d8ea723c Mon Sep 17 00:00:00 2001 From: Adriana Draghici Date: Thu, 6 May 2010 12:40:51 +0000 Subject: [PATCH] autorun: server pid file in /var/tmp, added stop-server script --- autorun/Util.py | 2 +- autorun/server/start-server | 4 ++-- autorun/server/stop-server | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100755 autorun/server/stop-server diff --git a/autorun/Util.py b/autorun/Util.py index 478918a..279afce 100644 --- a/autorun/Util.py +++ b/autorun/Util.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -DAEMON_PID_PATH = "/var/run/autorun-server.pid" +DAEMON_PID_PATH = "/var/tmp/autorun-server.pid" SERVER_DIR = "/home/p2p/cs-p2p-next/autorun/server/" SERVER_FILE = "Server.py" SERVER_TYPE = "python" diff --git a/autorun/server/start-server b/autorun/server/start-server index d2253cf..18c6618 100755 --- a/autorun/server/start-server +++ b/autorun/server/start-server @@ -6,5 +6,5 @@ if test $# -ne 1; then fi ip_address=$1 -rm /var/run/autorun-server.pid -PYTHONPATH=/home/p2p/cs-p2p-next/ppf/log-parser/generic python /home/p2p/cs-p2p-next/autorun/server/Server.py no $ip_address +rm /var/tmp/autorun-server.pid +PYTHONPATH=/home/p2p/cs-p2p-next/ppf/log-parser/generic python /home/p2p/cs-p2p-next/autorun/server/Server.py start $ip_address diff --git a/autorun/server/stop-server b/autorun/server/stop-server new file mode 100755 index 0000000..9d3c7cd --- /dev/null +++ b/autorun/server/stop-server @@ -0,0 +1,3 @@ +#!/bin/bash + +PYTHONPATH=/home/p2p/cs-p2p-next/ppf/log-parser/generic python /home/p2p/cs-p2p-next/autorun/server/Server.py stop -- 2.20.1