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
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
675a55c0
You need to sign in or sign up before continuing.
Commit
675a55c0
authored
12 years ago
by
Tomáš Plesník
Browse files
Options
Downloads
Patches
Plain Diff
uprava instalatoru pro Warden server v2.0.0
parent
f4589f9e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/warden-server/sh/install.sh
+16
-91
16 additions, 91 deletions
src/warden-server/sh/install.sh
with
16 additions
and
91 deletions
src/warden-server/sh/install.sh
+
16
−
91
View file @
675a55c0
...
...
@@ -3,35 +3,11 @@
# install.sh
#
# Copyright (C) 2011-2012 Cesnet z.s.p.o
# Author(s): Tomas PLESNIK <plesnik@ics.muni.cz>
# Jan SOUKAL <soukal@ics.muni.cz>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the Cesnet z.s.p.o nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# This software is provided ``as is'', and any express or implied
# warranties, including, but not limited to, the implied warranties of
# merchantability and fitness for a particular purpose are disclaimed.
# In no event shall the Cesnet z.s.p.o or contributors be liable for
# any direct, indirect, incidental, special, exemplary, or consequential
# damages (including, but not limited to, procurement of substitute
# goods or services; loss of use, data, or profits; or business
# interruption) however caused and on any theory of liability, whether
# in contract, strict liability, or tort (including negligence or
# otherwise) arising in any way out of the use of this software, even
# if advised of the possibility of such damage.
VERSION
=
"0.2"
# Use of this source is governed by a BSD-style license, see LICENSE file.
VERSION
=
"2.0"
#-------------------------------------------------------------------------------
# FUNCTIONS
...
...
@@ -86,26 +62,6 @@ err_clean()
}
os_chck
()
{
OS
=
`
uname
`
if
[
"
$OS
"
!=
"Linux"
]
;
then
echo
"Sorry, unsupported operating system detected -
\"
${
OS
}
\"
!"
exit
1
fi
}
shell_chck
()
{
SHELL
=
`
echo
$SHELL
`
if
[
"
$SHELL
"
!=
"/bin/bash"
]
;
then
echo
"Sorry, this script is usable in Bourne Again Shell (bash) only!"
exit
1
fi
}
root_chck
()
{
if
[
$UID
-ne
0
]
;
then
...
...
@@ -177,8 +133,8 @@ modules_chck()
make_warden_dir
()
{
echo
-n
"Creating warden server directory ... "
test
-d
$
{
prefix
}
||
mkdir
-p
$
{
prefix
}
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
...
...
@@ -187,7 +143,7 @@ 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
}
...
...
@@ -263,14 +219,14 @@ make_server_conf()
changeServerPath
()
{
echo
"Update server path ..."
;
for
file
in
`
ls
-1
$bin
|
grep
-v
warden-alive |
grep
-v
create_tables.sh |
grep
-v
wardend
`
for
file
in
`
ls
-1
$bin
`
do
echo
"- update server path:
${
bin
}
/
$file
"
perl
-pi
-e
"s#/opt#
${
prefix
}
#"
${
bin
}
/
$file
done
echo
"- update server path:
$
{
apache_conf
}
"
perl
-pi
-e
"s#/opt#
${
prefix
}
#"
$
{
apache_conf
}
echo
"- update server path:
$apache_conf
"
perl
-pi
-e
"s#/opt#
${
prefix
}
#"
$apache_conf
echo
"- update server path:
${
lib
}
/Warden.pm"
perl
-pi
-e
"s#/opt#
${
prefix
}
#"
${
lib
}
/Warden.pm
...
...
@@ -281,35 +237,21 @@ changeServerPath()
updateCertsPath
()
{
echo
"- update certs path:
$
{
apache_conf
}
"
perl
-pi
-e
"s#server-cert.pem#
${
cert
}
#"
$
{
apache_conf
}
perl
-pi
-e
"s#server-key.pem#
${
key
}
#"
$
{
apache_conf
}
perl
-pi
-e
"s#ca-cert.pem#
${
ca_file
}
#"
$
{
apache_conf
}
echo
"- update certs path:
$apache_conf
"
perl
-pi
-e
"s#server-cert.pem#
${
cert
}
#"
$apache_conf
perl
-pi
-e
"s#server-key.pem#
${
key
}
#"
$apache_conf
perl
-pi
-e
"s#ca-cert.pem#
${
ca_file
}
#"
$apache_conf
}
#create_db()
#{
# echo -n "Creating warden server database ... "
# $create_tables $db_file 2> $err || err_clean
# if chmod 600 $db_file 2> $err; then
# echo "OK"
# else
# err_clean
# fi
#}
create_symlinks
()
{
echo
"Creating symbolic links ..."
for
file
in
`
ls
-1
$bin
|
grep
-v
warden-alive |
grep
-v
create_tables.sh |
grep
-v
wardend
`
for
file
in
`
ls
-1
$bin
`
do
echo
"- making symlink:
${
local_bin
}
/
$file
->
${
bin
}
/
$file
"
ln
-s
${
bin
}
/
$file
${
local_bin
}
/
$file
done
# echo "- making symlink: ${bin}/wardend -> $init"
# ln -s ${bin}/wardend $init
}
...
...
@@ -318,14 +260,7 @@ create_symlinks()
#-------------------------------------------------------------------------------
# list of used Perl modules
#modules=(SOAP::Lite SOAP::Transport::TCP File::Pid POSIX DBI DBD::SQLite Format::Human::Bytes Sys::Syslog File::Basename FindBin Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL)
modules
=(
DBI DBD::mysql Format::Human::Bytes Sys::Syslog File::Basename FindBin Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL MIME::Base64 Crypt::X509
)
# OS test
os_chck
# Shell test
shell_chck
modules
=(
SOAP::Lite SOAP::Transport::HTTP DBI DBD::mysql Format::Human::Bytes Sys::Syslog File::Basename Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL MIME::Base64 Crypt::X509
)
# read input
while
getopts
"d:k:c:a:Vh"
options
;
do
...
...
@@ -352,7 +287,6 @@ hostname=`hostname`
key_file
=
`
basename
$key
`
cert_file
=
`
basename
$cert
`
package_version
=
`
cat
${
dirname
}
/warden-server/etc/package_version
`
create_tables
=
"
${
dirname
}
/warden-server/bin/create_tables.sh"
[[
$prefix
==
*
/
]]
&&
prefix
=
"
${
prefix
%?
}
"
# remove last char (slash) from prefix
server_path
=
"
${
prefix
}
/warden-server"
...
...
@@ -364,9 +298,7 @@ server_conf="${etc}/warden-server.conf"
apache_conf
=
"
${
etc
}
/warden-apache.conf"
var
=
"
${
server_path
}
/var"
lib
=
"
${
server_path
}
/lib"
db_file
=
"
${
var
}
/warden.db"
err
=
"/tmp/warden-err"
init
=
"/etc/init.d/wardend"
# check if warden-server is installed
old_package_chck
...
...
@@ -377,9 +309,6 @@ echo "------------------------- Dependencies check-in -------------------------"
# Perl interpreter test
perl_chck
## SQLite database engine test
#sqlite_chck
# Perl modules test
modules_chck
...
...
@@ -395,9 +324,6 @@ make_client_conf
# create server configuration file
make_server_conf
## create warden server database
#create_db
#update paths in utilities
changeServerPath
...
...
@@ -412,7 +338,6 @@ 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]"
echo
echo
"Installation of
$package_version
package was SUCCESSFUL!!!"
...
...
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