Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Warden - archive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
713
Warden
Warden - archive
Commits
220f9318
Commit
220f9318
authored
13 years ago
by
Tomáš Plesník
Browse files
Options
Downloads
Patches
Plain Diff
zmena verze skriptu; pridana kontrola nainstalovaneho klienta; zmena odsazeni
parent
ae775364
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/warden-client/sh/install.sh
+163
-147
163 additions, 147 deletions
src/warden-client/sh/install.sh
with
163 additions
and
147 deletions
src/warden-client/sh/install.sh
+
163
−
147
View file @
220f9318
...
@@ -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.1
.0
"
VERSION
=
"1.1"
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# FUNCTIONS
# FUNCTIONS
...
@@ -69,7 +69,7 @@ err()
...
@@ -69,7 +69,7 @@ err()
cat
$err
cat
$err
rm
-rf
$err
rm
-rf
$err
echo
echo
echo
"Installation of
$package_
name
package FAILED!!!"
echo
"Installation of
$package_
version
package FAILED!!!"
exit
1
exit
1
}
}
...
@@ -82,7 +82,7 @@ err_clean()
...
@@ -82,7 +82,7 @@ err_clean()
cat
$err
cat
$err
rm
-rf
$err
rm
-rf
$err
echo
echo
echo
"Installation of
$package_
name
package FAILED!!!"
echo
"Installation of
$package_
version
package FAILED!!!"
exit
1
exit
1
}
}
...
@@ -141,6 +141,17 @@ params_chck()
...
@@ -141,6 +141,17 @@ params_chck()
}
}
old_client_chck
()
{
old_package_version
=
"
$etc
/package_version.txt"
if
[
-f
$old_package_version
]
;
then
echo
"Sorry, but
$old_package_version
package is installed!"
echo
"For update of warden client package please use update.sh script."
exit
1
fi
}
perl_chck
()
perl_chck
()
{
{
echo
-n
"Checking Perl interpreter ... "
echo
-n
"Checking Perl interpreter ... "
...
@@ -186,7 +197,7 @@ installation_dir_chck()
...
@@ -186,7 +197,7 @@ installation_dir_chck()
make_warden_dir
()
make_warden_dir
()
{
{
echo
-n
"Creating warden client directory ... "
echo
-n
"Creating warden client directory ... "
cp
-R
`
dirname
$0
`
/warden-client
$prefix
2>
$err
;
ret_val
=
`
echo
$?
`
cp
-R
$
dirname
/warden-client
$prefix
2>
$err
;
ret_val
=
`
echo
$?
`
if
[
$ret_val
-eq
0
]
;
then
if
[
$ret_val
-eq
0
]
;
then
echo
"OK"
echo
"OK"
else
else
...
@@ -196,9 +207,9 @@ make_warden_dir()
...
@@ -196,9 +207,9 @@ make_warden_dir()
files
=(
CHANGELOG INSTALL LICENSE README README.cesnet
)
files
=(
CHANGELOG INSTALL LICENSE README README.cesnet
)
for
file
in
${
files
[@]
}
;
for
file
in
${
files
[@]
}
;
do
do
cp
-u
"
`
dirname
$0
`
/
$file
"
"
$client_path
/doc"
cp
-u
$
dirname
/
$file
"
$client_path
/doc"
done
done
cp
-u
"
`
dirname
$0
`
/uninstall.sh
"
"
$client_path
"
cp
-u
$
dirname
/uninstall.sh
"
$client_path
"
}
}
...
@@ -253,6 +264,7 @@ echo "#
...
@@ -253,6 +264,7 @@ echo "#
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
\$
SSL_CA_FILE =
\"
$ca_file
\"
;
\$
SSL_CA_FILE =
\"
$ca_file
\"
;
"
>
$conf_file
2>
$err
;
ret_val
=
`
echo
$?
`
"
>
$conf_file
2>
$err
;
ret_val
=
`
echo
$?
`
if
[
$ret_val
-eq
0
]
;
then
if
[
$ret_val
-eq
0
]
;
then
echo
"OK"
echo
"OK"
else
else
...
@@ -308,7 +320,8 @@ root_chck
...
@@ -308,7 +320,8 @@ root_chck
params_chck
params_chck
# create variables
# create variables
package_name
=
"warden-client-
$VERSION
"
dirname
=
`
dirname
$0
`
package_version
=
`
cat
$dirname
/warden-client/etc/package_version.txt
`
key_file
=
`
basename
$key
`
key_file
=
`
basename
$key
`
cert_file
=
`
basename
$cert
`
cert_file
=
`
basename
$cert
`
client_path
=
"
$prefix
/warden-client"
client_path
=
"
$prefix
/warden-client"
...
@@ -316,6 +329,9 @@ etc="$client_path/etc"
...
@@ -316,6 +329,9 @@ etc="$client_path/etc"
conf_file
=
"
$etc
/warden-client.conf"
conf_file
=
"
$etc
/warden-client.conf"
err
=
"/tmp/warden-err"
err
=
"/tmp/warden-err"
# check if warden-client is installed
old_client_chck
echo
echo
echo
"------------------------- Dependencies check-in -------------------------"
echo
"------------------------- Dependencies check-in -------------------------"
...
@@ -350,7 +366,7 @@ change_permissions
...
@@ -350,7 +366,7 @@ change_permissions
echo
echo
echo
"Please check configuration file in
$conf_file
!"
echo
"Please check configuration file in
$conf_file
!"
echo
echo
echo
"Installation of
$package_
name
package was SUCCESSFUL!!!"
echo
"Installation of
$package_
version
package was SUCCESSFUL!!!"
# cleanup section
# cleanup section
rm
-rf
$err
rm
-rf
$err
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment