Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
HaiSoft (public)
Wrong Listener Killer
Commits
72cc173d
Commit
72cc173d
authored
May 29, 2017
by
UltimateByte
Committed by
GitHub
May 29, 2017
Browse files
pre & post action adjustments
parent
6d041359
Changes
1
Hide whitespace changes
Inline
Side-by-side
wlk.sh
View file @
72cc173d
...
...
@@ -12,9 +12,9 @@ allowedname="httpd" # Which process should we get on speccified port
allowedpath
=
"/usr/sbin/httpd"
# Which is the correct path to run it
allowedusers
=
"root;"
# Which is the correct user to run it (separate with ; )
preaction
=
"service
${
allowedname
}
restart"
# Run a custom action if a problem is found
postaction
=
""
# Run a custom action after a problem was found and processes killed
downaction
=
"service
${
allowedname
}
start"
#
preaction="service ${allowedname} restart" # Run a custom action if a problem is found
postaction
=
"
service
${
allowedname
}
restart
"
# Run a custom action after a problem was found and processes killed
downaction
=
"service
${
allowedname
}
re
start"
logdir
=
"/root"
# Log directory (don't end with /)
mailalert
=
"yes"
# Wether to send a mail alert or not (yes/no)
...
...
@@ -204,7 +204,6 @@ fn_action(){
fn_mail_alert
else
fn_logecho
"[OK] The process on port
${
portcheck
}
meets requirements"
fn_postaction
exit
fi
}
...
...
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