Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
idp-tools
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
Container registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UnixMaster at Central-IT
idp-tools
Commits
6148dbd9
Commit
6148dbd9
authored
8 years ago
by
Cédric BRINER
Committed by
Cédric BRINER
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
added rewar
parent
4db65a49
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
idp-tools
+24
-16
24 additions, 16 deletions
idp-tools
with
24 additions
and
16 deletions
idp-tools
+
24
−
16
View file @
6148dbd9
...
...
@@ -76,6 +76,7 @@ function has_ssh_agent
fi
}
# GIT STUFF
function
get_git_for_sync_header
{
...
...
@@ -110,6 +111,8 @@ function get_git_hash
git
-C
${
IDP_HOME
}
log
--pretty
=
format:
'%H'
|
head
-1
}
# # # # # # # #
function
create_tmp_idp_sed
{
grep
-E
'ndb.*idp|arbitrator.*idp'
/etc/hosts
\
...
...
@@ -211,6 +214,7 @@ function status_old()
done
}
# MYSQL STUFF
function
get_mysql_pw
{
...
...
@@ -384,14 +388,6 @@ function load_mysql()
echo
"✔ shibboleth systems is up"
}
#############################################################$$
##############################################################
##############################################################
...
...
@@ -722,6 +718,20 @@ function construct_sync_header
}
function
rewar
{
pb
"- rebuild the war itself"
JAVACMD
=
/usr/bin/java /opt/shibboleth-idp/bin/build.sh
-Didp
.target.dir
=
/opt/shibboleth-idp | indent 4
pb
"- stop service"
systemctl stop tomcat7.service | indent 4
pb
"- delete old war"
rm
-fr
/var/lib/tomcat7/webapps/idp | indent 4
pb
"- start service"
systemctl start tomcat7.service | indent 4
}
function
sync
{
#
...
...
@@ -1338,14 +1348,7 @@ EOF
echo
-e
"
\e
[34m- rebuild war (rebuild the war, stop tomcat, remove old war, start tomcat)
\e
[0m"
if
test
${
RESTART_DAEMON
}
=
"True"
then
echo
-e
"
\e
[34m- rebuild the war itself
\e
[0m"
ssh root@
${
h
}
"JAVACMD=/usr/bin/java /opt/shibboleth-idp/bin/build.sh -Didp.target.dir=/opt/shibboleth-idp"
| indent 7
echo
-e
"
\e
[34m- stop service
\e
[0m"
ssh root@
${
h
}
"systemctl stop tomcat7.service"
| indent 7
echo
-e
"
\e
[34m- delete old war
\e
[0m"
ssh root@
${
h
}
"rm -fr /var/lib/tomcat7/webapps/idp"
| indent 7
echo
-e
"
\e
[34m- start service
\e
[0m"
ssh root@
${
h
}
"systemctl start tomcat7.service"
| indent 7
ssh root@
${
h
}
idp-tools rewar | indent 3
else
echo
-e
"
\e
[34mwar will no be re-consructed as this imply a restart of tomcat7
\e
[0m"
echo
-e
"
\e
[34mand as the flag (RESTART_DAEMON) is set false
\e
[0m"
...
...
@@ -1920,6 +1923,7 @@ function usage_n_exit
pb
" | shell-mysql"
pb
" | sync [--no-restart] <to_host>"
pb
" | tungsten-watch-sync <other_host>"
pb
" | rewar"
pb
" | reload <pattern_beans> [host,[...]]"
pb
" | aacli [-h | -l [<entityId>] | [-r] <user> <entityId>]"
pb
" | "
...
...
@@ -1927,6 +1931,7 @@ function usage_n_exit
pb
""
pb
"Info:"
pb
" adjust : adjust chown and mode on some files"
pb
" rewar : stop tomcat, rebuild war, delete deployed war, star tomcat"
pb
" tungsten-status : gives the tungsten status to see if stuff are synchronized"
pb
" dump-mysql : dump myqsl"
pb
" load-mysql : load mysql"
...
...
@@ -2006,6 +2011,9 @@ case "$1" in
has_ssh_agent
tungsten_watch_sync
$2
;;
rewar
)
rewar
;;
reload
)
shift
if
test
$#
=
0
...
...
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