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
cf0309ca
Unverified
Commit
cf0309ca
authored
Jan 26, 2018
by
Andrew Babichev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename sneakers_monit_bin to monit_bin
parent
acee972a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
README.md
+1
-1
lib/capistrano/tasks/monit.rake
+7
-7
No files found.
README.md
View file @
cf0309ca
...
...
@@ -32,7 +32,7 @@ Configurable options, shown here with defaults:
# sneakers monit
:sneakers_monit_conf_dir
=>
'/etc/monit/conf.d'
:sneakers_monit_use_sudo
=>
true
:
sneakers_
monit_bin
=>
'/usr/bin/monit'
:monit_bin
=>
'/usr/bin/monit'
:sneakers_monit_templates_path
=>
'config/deploy/templates'
```
...
...
lib/capistrano/tasks/monit.rake
View file @
cf0309ca
namespace
:load
do
task
:defaults
do
set
:monit_bin
,
'/usr/bin/monit'
set
:sneakers_monit_default_hooks
,
true
set
:sneakers_monit_conf_dir
,
->
{
'/etc/monit/conf.d'
}
set
:sneakers_monit_use_sudo
,
true
set
:sneakers_monit_bin
,
'/usr/bin/monit'
set
:sneakers_monit_templates_path
,
'config/deploy/templates'
end
end
...
...
@@ -32,42 +32,42 @@ namespace :sneakers do
mv_command
=
"mv
#{
fetch
(
:tmp_dir
)
}
/monit.conf
#{
fetch
(
:sneakers_monit_conf_dir
)
}
/
#{
sneakers_service_name
}
.conf"
sudo_if_needed
mv_command
sudo_if_needed
"
#{
fetch
(
:
sneakers_
monit_bin
)
}
reload"
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
reload"
end
end
desc
'Monitor Sneakers monit-service'
task
:monitor
do
on
roles
(
fetch
(
:sneakers_role
))
do
sudo_if_needed
"
#{
fetch
(
:
sneakers_
monit_bin
)
}
monitor
#{
sneakers_service_name
}
"
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
monitor
#{
sneakers_service_name
}
"
end
end
desc
'Unmonitor Sneakers monit-service'
task
:unmonitor
do
on
roles
(
fetch
(
:sneakers_role
))
do
sudo_if_needed
"
#{
fetch
(
:
sneakers_
monit_bin
)
}
unmonitor
#{
sneakers_service_name
}
"
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
unmonitor
#{
sneakers_service_name
}
"
end
end
desc
'Start Sneakers monit-service'
task
:start
do
on
roles
(
fetch
(
:sneakers_role
))
do
sudo_if_needed
"
#{
fetch
(
:
sneakers_
monit_bin
)
}
start
#{
sneakers_service_name
}
"
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
start
#{
sneakers_service_name
}
"
end
end
desc
'Stop Sneakers monit-service'
task
:stop
do
on
roles
(
fetch
(
:sneakers_role
))
do
sudo_if_needed
"
#{
fetch
(
:
sneakers_
monit_bin
)
}
stop
#{
sneakers_service_name
}
"
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
stop
#{
sneakers_service_name
}
"
end
end
desc
'Restart Sneakers monit-service'
task
:restart
do
on
roles
(
fetch
(
:sneakers_role
))
do
sudo_if_needed
"
#{
fetch
(
:
sneakers_
monit_bin
)
}
restart
#{
sneakers_service_name
}
"
sudo_if_needed
"
#{
fetch
(
:monit_bin
)
}
restart
#{
sneakers_service_name
}
"
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