Skip to content
Snippets Groups Projects
Commit ec7f4918 authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

uzavorkovani pouzitych promennych v retezcich

parent d55929fe
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# otherwise) arising in any way out of the use of this software, even # otherwise) arising in any way out of the use of this software, even
# if advised of the possibility of such damage. # if advised of the possibility of such damage.
VERSION="1.0" VERSION="1.1"
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# FUNCTIONS # FUNCTIONS
...@@ -88,7 +88,7 @@ os_chck() ...@@ -88,7 +88,7 @@ os_chck()
{ {
OS=`uname` OS=`uname`
if [ "$OS" != "Linux" ]; then if [ "$OS" != "Linux" ]; then
echo "Sorry, unsupported operating system detected - \"$OS\"!" echo "Sorry, unsupported operating system detected - \"${OS}\"!"
exit 1 exit 1
fi fi
} }
...@@ -117,7 +117,7 @@ params_chck() ...@@ -117,7 +117,7 @@ params_chck()
{ {
if [ -z $prefix ]; then if [ -z $prefix ]; then
prefix=/opt prefix=/opt
echo "Warning: parameter -d <directory> is not set - default uninstallation directory is $prefix!" echo "Warning: parameter -d <directory> is not set - default uninstallation directory is ${prefix}!"
fi fi
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
# if advised of the possibility of such damage. # if advised of the possibility of such damage.
VERSION="1.1" VERSION="1.2"
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# FUNCTIONS # FUNCTIONS
...@@ -90,7 +90,7 @@ os_chck() ...@@ -90,7 +90,7 @@ os_chck()
{ {
OS=`uname` OS=`uname`
if [ "$OS" != "Linux" ]; then if [ "$OS" != "Linux" ]; then
echo "Sorry, unsupported operating system detected - \"$OS\"!" echo "Sorry, unsupported operating system detected - \"${OS}\"!"
exit 1 exit 1
fi fi
} }
...@@ -119,7 +119,7 @@ params_chck() ...@@ -119,7 +119,7 @@ params_chck()
{ {
if [ -z $prefix ]; then if [ -z $prefix ]; then
prefix=/opt 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 fi
} }
...@@ -353,7 +353,7 @@ make_conf_file ...@@ -353,7 +353,7 @@ make_conf_file
change_permissions change_permissions
echo echo
echo "Please check configuration file in $conf_file!" echo "Please check configuration file in ${conf_file}!"
echo echo
echo "Warden client directory: $client_path" echo "Warden client directory: $client_path"
echo echo
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# otherwise) arising in any way out of the use of this software, even # otherwise) arising in any way out of the use of this software, even
# if advised of the possibility of such damage. # if advised of the possibility of such damage.
VERSION="0.1" VERSION="0.2"
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# FUNCTIONS # FUNCTIONS
...@@ -74,8 +74,8 @@ err_clean() ...@@ -74,8 +74,8 @@ err_clean()
{ {
echo "FAILED!" echo "FAILED!"
echo " -> Reverting changes of warden server package ... OK" echo " -> Reverting changes of warden server package ... OK"
rm -rf $server_path/* > /dev/null 2>&1 # delete new version rm -rf ${server_path}/* > /dev/null 2>&1 # delete new version
cp -R $backup_dir/* $server_path # copy old backuped server cp -R ${backup_dir}/* $server_path # copy old backuped server
chmod 600 $db_file # change permission to DB file chmod 600 $db_file # change permission to DB file
for file in `ls -1 $bin | grep -v warden-alive | grep -v create_tables.sh | grep -v wardend` for file in `ls -1 $bin | grep -v warden-alive | grep -v create_tables.sh | grep -v wardend`
do do
...@@ -95,7 +95,7 @@ os_chck() ...@@ -95,7 +95,7 @@ os_chck()
{ {
OS=`uname` OS=`uname`
if [ "$OS" != "Linux" ]; then if [ "$OS" != "Linux" ]; then
echo "Sorry, unsupported operating system detected - \"$OS\"!" echo "Sorry, unsupported operating system detected - \"${OS}\"!"
exit 1 exit 1
fi fi
} }
...@@ -124,7 +124,7 @@ params_chck() ...@@ -124,7 +124,7 @@ params_chck()
{ {
if [ -z $prefix ]; then if [ -z $prefix ]; then
prefix=/opt prefix=/opt
echo "Warning: parameter -d <directory> is not set - default uninstallation directory is $prefix!" echo "Warning: parameter -d <directory> is not set - default uninstallation directory is ${prefix}!"
fi fi
} }
...@@ -155,7 +155,7 @@ warden_dir_chck() ...@@ -155,7 +155,7 @@ warden_dir_chck()
stop_warden_server() stop_warden_server()
{ {
echo "Stopping warden server ... " echo "Stopping warden server ... "
$init force-stop 1>/dev/null 2>&1 ${init} force-stop 1>/dev/null 2>&1
} }
...@@ -176,10 +176,10 @@ delete_symlinks() ...@@ -176,10 +176,10 @@ delete_symlinks()
echo -n "Deleting symlinks from /usr/local/bin ..." echo -n "Deleting symlinks from /usr/local/bin ..."
for file in `ls -1 $bin | grep -v warden-alive | grep -v wardend | grep -v create_tables.sh` for file in `ls -1 $bin | grep -v warden-alive | grep -v wardend | grep -v create_tables.sh`
do do
rm -rf /usr/local/bin/$file 2> /dev/null rm -rf ${local_bin}/$file 2> /dev/null
done done
echo "OK" echo "OK"
echo -n "Deleting symlink from $init ..." echo -n "Deleting symlink from ${init} ..."
rm -rf $init 2> /dev/null rm -rf $init 2> /dev/null
echo "OK" echo "OK"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment