diff --git a/src/warden-client/sh/install.sh b/src/warden-client/sh/install.sh index 8d0e21b9a634184771888ff21f65bc4642b0cb11..e7c85f8c749a7121169a8265f9e8572653555ad9 100755 --- a/src/warden-client/sh/install.sh +++ b/src/warden-client/sh/install.sh @@ -31,7 +31,7 @@ # otherwise) arising in any way out of the use of this software, even # if advised of the possibility of such damage. -VERSION="1.1" +VERSION="1.2" #------------------------------------------------------------------------------- # FUNCTIONS @@ -91,7 +91,7 @@ os_chck() { OS=`uname` if [ "$OS" != "Linux" ]; then - echo "Sorry, unsupported operating system detected - \"$OS\"!" + echo "Sorry, unsupported operating system detected - \"${OS}\"!" exit 1 fi } @@ -120,7 +120,7 @@ params_chck() { if [ -z $prefix ]; then prefix=/opt - echo "Warning: parameter -d <directory> is not set - default installation directory is $prefix!" + echo "Warning: parameter -d <directory> is not set - default installation directory is ${prefix}!" fi if [ -z $user ]; then echo "Parameter -u <user> is not set!" @@ -143,7 +143,7 @@ params_chck() old_client_chck() { - old_package_version_file="$etc/package_version" + old_package_version_file={$etc}/package_version if [ -f $old_package_version_file ]; then old_package_version=`cat $old_package_version_file` echo "Sorry, but $old_package_version package is installed!" @@ -183,6 +183,7 @@ modules_chck() make_warden_dir() { echo -n "Creating warden client directory ... " + test -d $prefix || mkdir -p $prefix if cp -R ${dirname}/warden-client $prefix 2> $err; then echo "OK" else @@ -192,9 +193,9 @@ make_warden_dir() files=(CHANGELOG INSTALL LICENSE README README.cesnet) for file in ${files[@]}; do - cp ${dirname}/$file "${client_path}/doc" + cp ${dirname}/$file ${client_path}/doc done - cp ${dirname}/uninstall.sh "$client_path" + cp ${dirname}/uninstall.sh $client_path } @@ -347,7 +348,7 @@ make_conf_file change_permissions echo -echo "Please check configuration file in $conf_file!" +echo "Please check configuration file in ${conf_file}!" echo echo "Warden client directory: $client_path" echo diff --git a/src/warden-server/sh/install.sh b/src/warden-server/sh/install.sh index 238a086b33175de8eab9d807690a567bfea87260..d75691928fde6c979a9310266d693617e3f1714a 100755 --- a/src/warden-server/sh/install.sh +++ b/src/warden-server/sh/install.sh @@ -31,7 +31,7 @@ # otherwise) arising in any way out of the use of this software, even # if advised of the possibility of such damage. -VERSION="0.1" +VERSION="0.2" #------------------------------------------------------------------------------- # FUNCTIONS @@ -90,7 +90,7 @@ os_chck() { OS=`uname` if [ "$OS" != "Linux" ]; then - echo "Sorry, unsupported operating system detected - \"$OS\"!" + echo "Sorry, unsupported operating system detected - \"${OS}\"!" exit 1 fi } @@ -119,7 +119,7 @@ params_chck() { if [ -z $prefix ]; then prefix=/opt - echo "Warning: parameter -d <directory> is not set - default installation directory is $prefix!" + echo "Warning: parameter -d <directory> is not set - default installation directory is ${prefix}!" fi if [ -z $key ]; then echo "Parameter -k <ssl_key_file> is not set!" @@ -138,7 +138,7 @@ params_chck() old_package_chck() { - old_package_version_file="$etc/package_version" + old_package_version_file="${etc}/package_version" if [ -f $old_package_version_file ]; then old_package_version=`cat $old_package_version_file` echo "Sorry, but $old_package_version package is installed!" @@ -189,7 +189,8 @@ modules_chck() make_warden_dir() { echo -n "Creating warden server directory ... " - if cp -R $dirname/warden-server $prefix 2> $err; then + test -d $prefix || mkdir -p $prefix + if cp -R ${dirname}/warden-server $prefix 2> $err; then echo "OK" else err_clean @@ -198,9 +199,9 @@ make_warden_dir() files=(CHANGELOG INSTALL LICENSE README) for file in ${files[@]}; do - cp $dirname/$file $server_path/doc + cp ${dirname}/$file $server_path/doc done - cp $dirname/uninstall.sh $server_path + cp ${dirname}/uninstall.sh $server_path } @@ -417,8 +418,8 @@ create_db create_symlinks echo -echo "Please check client configuration file in $client_conf!" -echo "Please check server configuration file in $server_conf!" +echo "Please check client configuration file in ${client_conf}!" +echo "Please check server configuration file in ${server_conf}!" echo echo "Warden server directory: $server_path" echo "Warden server daemon: $init [start|stop|status|restart|force-stop]"