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

pridano vytvareni warden prefix adresare pokud pri instralaci neexistuje;...

pridano vytvareni warden prefix adresare pokud pri instralaci neexistuje; uzavorkovani pouzitych promennych v retezcich
parent a69354e4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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]"
......
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