Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Warden
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
Show more breadcrumbs
Pavel Valach
Warden
Commits
a11910e4
Commit
a11910e4
authored
12 years ago
by
Tomáš Plesník
Browse files
Options
Downloads
Patches
Plain Diff
odstranena nutnost pouziti parametru -d z uninstall.sh
parent
c0c8d2d9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/warden-server/doc/README
+2
-3
2 additions, 3 deletions
src/warden-server/doc/README
src/warden-server/doc/UNINSTALL
+1
-1
1 addition, 1 deletion
src/warden-server/doc/UNINSTALL
src/warden-server/sh/uninstall.sh
+7
-23
7 additions, 23 deletions
src/warden-server/sh/uninstall.sh
with
10 additions
and
27 deletions
src/warden-server/doc/README
+
2
−
3
View file @
a11910e4
...
@@ -252,12 +252,11 @@ E. Uninstallation
...
@@ -252,12 +252,11 @@ E. Uninstallation
For more information about uninstall.sh options run uninstall.sh -h
For more information about uninstall.sh options run uninstall.sh -h
Usage: $ ./uninstall.sh [-d <directory>] [-hV]
Usage: $ ./uninstall.sh [-hV]
-d <directory> uninstallation directory (default: /opt)
-h print this help
-h print this help
-V print script version number and exit
-V print script version number and exit
Example: # ./uninstall.sh
-d /opt
Example: # ./uninstall.sh
You must be root for running this script.
You must be root for running this script.
...
...
This diff is collapsed.
Click to expand it.
src/warden-server/doc/UNINSTALL
+
1
−
1
View file @
a11910e4
...
@@ -26,7 +26,7 @@ B. Uninstallation step
...
@@ -26,7 +26,7 @@ B. Uninstallation step
1) Uninstall Warden server package (default installation path)
1) Uninstall Warden server package (default installation path)
# /opt/warden-server/uninstall.sh
-d /opt
# /opt/warden-server/uninstall.sh
C. Post-uninstallation steps
C. Post-uninstallation steps
...
...
This diff is collapsed.
Click to expand it.
src/warden-server/sh/uninstall.sh
+
7
−
23
View file @
a11910e4
...
@@ -12,12 +12,11 @@ VERSION="2.1"
...
@@ -12,12 +12,11 @@ VERSION="2.1"
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
usage
()
usage
()
{
{
echo
"Usage:
`
basename
$0
`
[-d <directory>] [-hV]"
echo
"Usage:
`
basename
$0
`
[-hV]"
echo
"-d <directory> uninstallation directory (default: /opt)"
echo
"-h print this help"
echo
"-h print this help"
echo
"-V print script version number and exit"
echo
"-V print script version number and exit"
echo
echo
echo
"Example: # ./
`
basename
$0
`
-d /opt
"
echo
"Example: # ./
`
basename
$0
`
"
echo
echo
echo
"Note: You must be root for running this script."
echo
"Note: You must be root for running this script."
echo
" For more information about uninstallation process, see README file (section Uninstallation)."
echo
" For more information about uninstallation process, see README file (section Uninstallation)."
...
@@ -72,15 +71,6 @@ root_chck()
...
@@ -72,15 +71,6 @@ root_chck()
}
}
params_chck
()
{
if
[
-z
$prefix
]
;
then
prefix
=
/opt
echo
"Warning: parameter -d <directory> is not set - default uninstallation directory is
${
prefix
}
!"
fi
}
obtain_package_version
()
obtain_package_version
()
{
{
if
[
-f
$old_package_version_file
]
;
then
if
[
-f
$old_package_version_file
]
;
then
...
@@ -94,9 +84,9 @@ obtain_package_version()
...
@@ -94,9 +84,9 @@ obtain_package_version()
warden_dir_chck
()
warden_dir_chck
()
{
{
echo
-n
"Checking Warden server directory ... "
echo
-n
"Checking Warden server directory ... "
if
[
!
-
d
$server_path
]
;
then
if
[
!
-
f
$
{
server_path
}
/etc/package_version
]
;
then
echo
"FAILED!"
echo
"FAILED!"
ls
$server_path
ls
$
{
server_path
}
/etc/package_version
exit
1
exit
1
else
else
echo
"OK"
echo
"OK"
...
@@ -138,7 +128,7 @@ uninstall_warden_server()
...
@@ -138,7 +128,7 @@ uninstall_warden_server()
{
{
echo
-n
"Uninstalling
$package_version
package ... "
echo
-n
"Uninstalling
$package_version
package ... "
cp
${
doc
}
/UNINSTALL
$uninstall_file
cp
${
doc
}
/UNINSTALL
$uninstall_file
if
rm
-rf
$server_path
2>
$err
;
then
if
rm
-rf
$
(
server_path
)
/
*
2>
$err
;
then
echo
"OK"
echo
"OK"
else
else
err_clean
err_clean
...
@@ -152,9 +142,8 @@ uninstall_warden_server()
...
@@ -152,9 +142,8 @@ uninstall_warden_server()
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# read input
# read input
while
getopts
"
d:
Vh"
options
;
do
while
getopts
"Vh"
options
;
do
case
$options
in
case
$options
in
d
)
prefix
=
$OPTARG
;;
h
)
usage
;;
h
)
usage
;;
V
)
version
;;
V
)
version
;;
*
)
usage
;;
*
)
usage
;;
...
@@ -164,13 +153,8 @@ done
...
@@ -164,13 +153,8 @@ done
# root test
# root test
root_chck
root_chck
# params test
params_chck
# create variables
# create variables
[[
$prefix
==
*
/
]]
&&
prefix
=
"
${
prefix
%?
}
"
# remove last char (slash) from prefix
server_path
=
`
dirname
$0
`
dirname
=
`
dirname
$0
`
server_path
=
"
${
prefix
}
/warden-server"
bin
=
"
${
server_path
}
/bin"
bin
=
"
${
server_path
}
/bin"
local_bin
=
"/usr/local/bin"
local_bin
=
"/usr/local/bin"
etc
=
"
${
server_path
}
/etc"
etc
=
"
${
server_path
}
/etc"
...
...
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