Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pe-public/server_patching
1 result
Show changes
Commits on Source (2)
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## Release 0.3.1
* Fixed a bug with long process names.
## Release 0.3.0 ## Release 0.3.0
* Added resolve_to option to URL check. * Added resolve_to option to URL check.
......
{ {
"name": "ruthenium-server_patching", "name": "ruthenium-server_patching",
"version": "0.3.0", "version": "0.3.1",
"author": "Ruthenium", "author": "Ruthenium",
"summary": "Generate bash script to valideate server state.", "summary": "Generate bash script to valideate server state.",
"license": "MIT", "license": "MIT",
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
}, },
{ {
"name": "puppetlabs/concat", "name": "puppetlabs/concat",
"version_requirement": ">= 2.2.1 "version_requirement": ">= 2.2.1"
} }
], ],
"operatingsystem_support": [ "operatingsystem_support": [
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<%- $mounts.each |$mount| { %> <%- $mounts.each |$mount| { %>
# mount: <%= $mount %> # mount: <%= $mount %>
echo -n "Mount <%= $mount %>..." echo -n "Mount <%= $mount %>..."
if df -hT | tr -s ' ' | cut -d ' ' -f 7 | egrep '^<%= $mount %>$' >/dev/null; then if df --output=target | egrep '^<%= $mount %>$' >/dev/null; then
echo " OK." echo " OK."
else else
echo " FAIL." echo " FAIL."
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
# process <%= $process['name'] %> # process <%= $process['name'] %>
echo -n "Process <%= $process['name'] -%>..." echo -n "Process <%= $process['name'] -%>..."
<%- if 'command' in $process { -%> <%- if 'command' in $process { -%>
pgrep -a <%= $process['name'] %> | grep <%= $process['command'] %> > /dev/null pgrep -af <%= $process['name'] %> | grep <%= $process['command'] %> > /dev/null
<%- } else { -%> <%- } else { -%>
pgrep <%= $process['name'] %> > /dev/null pgrep -f <%= $process['name'] %> > /dev/null
<%- } -%> <%- } -%>
if [ $? -eq <%= $desired %> ]; then if [ $? -eq <%= $desired %> ]; then
echo " OK." echo " OK."
......
...@@ -22,7 +22,7 @@ if 'resolve_to' in $url { ...@@ -22,7 +22,7 @@ if 'resolve_to' in $url {
} else { $resolve = '' } } else { $resolve = '' }
-%> -%>
echo -n "Web URL <%= $url['url'] -%>..." echo -n "Web URL <%= $url['url'] -%>..."
status=$(curl -I -XGET --insecure -m 3<%= $resolve %> <%= $url['url'] %> 2>/dev/null | head -n 1 | cut -d' ' -f2) status=$(curl -s -o /dev/null -w "%{http_code}" -I -XGET --insecure -m 3<%= $resolve %> <%= $url['url'] %>)
if [ $status -eq <%= $url['status'] %> ]; then if [ $status -eq <%= $url['status'] %> ]; then
echo " OK." echo " OK."
else else
......