Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aliveNotifier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kpetersn
aliveNotifier
Commits
8a702ac7
Commit
8a702ac7
authored
10 years ago
by
kpetersn
Browse files
Options
Downloads
Patches
Plain Diff
Allow more than 4 args to be passed. Added test script.
parent
a211965d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
alived-notify
+9
-3
9 additions, 3 deletions
alived-notify
alived-notify-test
+5
-0
5 additions, 0 deletions
alived-notify-test
with
14 additions
and
3 deletions
alived-notify
+
9
−
3
View file @
8a702ac7
...
@@ -45,8 +45,14 @@ def main(args):
...
@@ -45,8 +45,14 @@ def main(args):
# Alive XML page
# Alive XML page
alive_xml_url
=
"
http://bcda.xray.aps.anl.gov/cgi-bin/alivexml.cgi
"
alive_xml_url
=
"
http://bcda.xray.aps.anl.gov/cgi-bin/alivexml.cgi
"
# Parse args
### Parse args
name
,
ip
,
state
,
mess
=
args
# The following line only works if the number of args is exactly four
#!name, ip, state, mess = args
# The following lines allow Dohn to add arguments without breaking the script
name
=
args
[
0
]
ip
=
args
[
1
]
state
=
args
[
2
]
mess
=
args
[
3
]
# Get the XLM file
# Get the XLM file
try
:
try
:
...
@@ -96,7 +102,7 @@ def main(args):
...
@@ -96,7 +102,7 @@ def main(args):
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
if
len
(
sys
.
argv
)
!=
5
:
if
len
(
sys
.
argv
)
<
5
:
print
"
Usage: an_hook.py <iocname> <ip> <status> <user_args>
"
print
"
Usage: an_hook.py <iocname> <ip> <status> <user_args>
"
#!print sys.argv
#!print sys.argv
else
:
else
:
...
...
This diff is collapsed.
Click to expand it.
alived-notify-test
0 → 100755
+
5
−
0
View file @
8a702ac7
#!/bin/bash
echo
"I was called:"
>>
/home/beams/KPETERSN/notifiy-log.txt
echo
"
$*
"
>>
/home/beams/KPETERSN/notifiy-log.txt
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