-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRun.aplf
34 lines (31 loc) · 1.02 KB
/
Run.aplf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Run dummy;msg;Exit;m
⍝ Use Exit Code of 10 for success,
⍝ 12 for expected failures,
⍝ 13 for global unexpected errors
⎕PW←1000
:If 0=⎕NC 'SSGDEBUG' ⋄ SSGDEBUG←0 ⋄ :EndIf
Exit←{SSGDEBUG:('Runtime would have exited with code ',⍕⍵)⎕SIGNAL 11 ⋄ ⎕OFF ⍵}
:Trap SSGDEBUG↓0
:If 1 1≢2↑m←2250⌶0
⎕←'ERROR: .NET Core is not available, unable to send e-mail.'
⎕←' 2250⌶0 returned ',m
Exit 12
:EndIf
InitGlobals
:if POLLTYPE≢'thirdparty'
⎕←'Checking Mantis'
:If 0≠≢msg←DyalogSecurityIssues INTERVAL ⋄ ⎕←msg ⋄ :EndIf
:EndIf
:if POLLTYPE≢'mantis'
⎕←'Checking third party sites'
:If 0≠≢msg←ThirdPartyVulnerabilities INTERVAL ⋄ ⎕←msg ⋄ :EndIf
:EndIf
Exit 10
:Else
⎕←'ERROR: Unexpected error in SSGMon'
⎕←⎕JSON⍠'Compact' 0⊢⎕DMX
:If ⎕EN=90
⎕←⎕EXCEPTION
:EndIf
Exit 13
:EndTrap