Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
capistrano-sneakers
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
capistrano-sneakers
Commits
a2f96b46
Commit
a2f96b46
authored
Apr 03, 2018
by
Andrew Babichev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-config sneakers monit service on fail
parent
4eec4195
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lib/capistrano/tasks/monit.rake
+11
-2
No files found.
lib/capistrano/tasks/monit.rake
View file @
a2f96b46
...
@@ -39,14 +39,23 @@ namespace :sneakers do
...
@@ -39,14 +39,23 @@ namespace :sneakers do
desc
'Monitor Sneakers monit-service'
desc
'Monitor Sneakers monit-service'
task
:monitor
do
task
:monitor
do
on
roles
(
fetch
(
:sneakers_roles
))
do
on
roles
(
fetch
(
:sneakers_roles
))
do
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
monitor
#{
sneakers_service_name
}
"
begin
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
monitor
#{
sneakers_service_name
}
"
rescue
invoke
'sneakers:monit:config'
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
monitor
#{
sneakers_service_name
}
"
end
end
end
end
end
desc
'Unmonitor Sneakers monit-service'
desc
'Unmonitor Sneakers monit-service'
task
:unmonitor
do
task
:unmonitor
do
on
roles
(
fetch
(
:sneakers_roles
))
do
on
roles
(
fetch
(
:sneakers_roles
))
do
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
unmonitor
#{
sneakers_service_name
}
"
begin
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
unmonitor
#{
sneakers_service_name
}
"
rescue
# no worries here
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment