diff --git a/src/warden-client/sh/install.sh b/src/warden-client/sh/install.sh index da22c04d512237f39a7afbb34b4d15c7da5f5184..8d0e21b9a634184771888ff21f65bc4642b0cb11 100755 --- a/src/warden-client/sh/install.sh +++ b/src/warden-client/sh/install.sh @@ -261,6 +261,7 @@ change_permissions() echo -n "Changing permissions to installed package ... " chown -R $user: $client_path 2> $err || err_clean chmod 400 ${etc}/$key_file ${etc}/$cert_file || err_clean + chmod 644 ${etc}/package_version || err_clean if chmod 600 $conf_file; then echo "OK" else diff --git a/src/warden-server/bin/warden-server.pl b/src/warden-server/bin/warden-server.pl index c40143a7c0fe21bc72e6d62c9ce580698600038b..0e53be5b8517dd688aa45a534dd83bd51009fb21 100755 --- a/src/warden-server/bin/warden-server.pl +++ b/src/warden-server/bin/warden-server.pl @@ -772,8 +772,7 @@ if ($UID != 0) { use POSIX qw(setsid); chdir '/'; umask 0; -# all stderr messages are situated in warden-server-error.log -#open STDERR, '/dev/null' or die errMsg("Can't write to /dev/null: $!"); +# all STDERR messages are printed on terminal open STDIN, '/dev/null' or die errMsg("Can't read /dev/null: $!"); open STDOUT, '/dev/null' or die errMsg("Can't write to /dev/null: $!"); defined( my $pid = fork ) or die errMsg("Can't fork: $!"); diff --git a/src/warden-server/bin/wardend b/src/warden-server/bin/wardend index 890d0e117c7eb26a0d44600bd163c5ba0f631b69..5ee238793b61f7ac9fef958cf45153751b276c8a 100755 --- a/src/warden-server/bin/wardend +++ b/src/warden-server/bin/wardend @@ -63,7 +63,7 @@ usage() { } check_status() { - /bin/ps axo pid,comm | grep -q "warden-server*"; RET_VAL=`echo $?` + /bin/ps axo pid,comm | grep -q "warden-serv*"; RET_VAL=`echo $?` if [ $RET_VAL -eq 0 ]; then STATUS=1 # true - warden is running else @@ -72,7 +72,7 @@ check_status() { } get_pid() { - PID=`ps axo pid,comm | grep "warden-server*" | sed 's/^ \{1,4\}//g' | cut -f 1 -d " "` + PID=`ps axo pid,comm | grep "warden-serv*" | sed 's/^ \{1,4\}//g' | cut -f 1 -d " "` return $PID } @@ -120,17 +120,14 @@ warden_status() { } warden_force_stop() { - check_status - if [ $STATUS -eq 1 ]; then - logger -s "Force stopping Warden server daemon ..." - get_pid PID - kill -9 $PID - if [ -e $PID_FILE ]; then - rm -f $PID_FILE - fi + logger -s "Force stopping Warden server daemon ..." + get_pid PID + kill -9 $PID 1>/dev/null 2>&1 + if [ -e $PID_FILE ]; then + rm -f $PID_FILE + fi + if [ -e $LOCK_FILE ]; then rm -f $LOCK_FILE - else - echo "Warden daemon is NOT running." fi } diff --git a/src/warden-server/sh/install.sh b/src/warden-server/sh/install.sh index be0454baa998923feb4f8b168efe941ba0a7df6b..238a086b33175de8eab9d807690a567bfea87260 100755 --- a/src/warden-server/sh/install.sh +++ b/src/warden-server/sh/install.sh @@ -219,12 +219,12 @@ make_client_conf() #------------------------------------------------------------------------------- # SSL_KEY_FILE - path to client SSL certificate key file #------------------------------------------------------------------------------- -\$SSL_KEY_FILE = \"${etc}/${key_file}\"; +\$SSL_KEY_FILE = \"${key}\"; #------------------------------------------------------------------------------- # SSL_CERT_FILE - path to client SSL certificate file #------------------------------------------------------------------------------- -\$SSL_CERT_FILE = \"${etc}/${cert_file}\"; +\$SSL_CERT_FILE = \"${cert}\"; #------------------------------------------------------------------------------- # SSL_CA_FILE - path to CA certificate file diff --git a/src/warden-server/sh/uninstall.sh b/src/warden-server/sh/uninstall.sh index 4fb9127780594bc04a5ae9799ecf984d169933aa..090350f9f23ba69e89a8bf997d206cb81f05f5c5 100755 --- a/src/warden-server/sh/uninstall.sh +++ b/src/warden-server/sh/uninstall.sh @@ -154,8 +154,8 @@ warden_dir_chck() stop_warden_server() { - echo -n "Stopping warden server ... " - $init stop || $init force-stop + echo "Stopping warden server ... " + $init force-stop 1>/dev/null 2>&1 }