-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmain.jps
82 lines (74 loc) · 2.59 KB
/
main.jps
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
type: update
name: Clamav Anti-virus
baseUrl: https://raw.githubusercontent.com/Aureliolo/Jelastic-Clamav/master
description:
text: /text/description.md
short: Virus Scan protection with Clamav, NO Automatic Scanning!
logo: images/clamav-logo.png
targetNodes:
nodeGroup: '*'
settings:
config:
fields:
- type: checkbox
name: expert
value: false
caption: Enable expert mode to directly modify the clamscan command
showIf:
true:
- type: string
name: expert-command
caption: Please include "-l /var/log/clamav/clamav.log" as well as "> /dev/null 2>&1"at the end, except if you REALLY know what your doing
value: clamscan --infected --recursive --exclude-dir="^/sys" --exclude-dir="^/dev" --exclude-dir="^/proc" -l /var/log/clamav/clamav.log --move=/opt/clamav_quarantined / > /dev/null 2>&1
required: true
false:
- type: checkbox
name: include-dirs
value: false
caption: Only scan a single folder instead of full node
showIf:
true:
type: string
name: include-dirs-path
value: /var/www/webroot
caption: Specify a folder to scan. DO NOT use / on this option.
#false:
# type: checkbox
# name: enable-mounts
# caption: Scan Mount Points
# value: false
onInstall:
cmd [${targetNodes.nodeGroup}]:
- curl -fsSL ${baseUrl}/scripts/detect-os-and-install.sh | /bin/bash
user: root
sayYes: true
onUninstall:
cmd [${targetNodes.nodeGroup}]:
- curl -fsSL ${baseUrl}/scripts/detect-os-and-uninstall.sh | /bin/bash
user: root
sayYes: true
onAfterRedeployContainer [${targetNodes.nodeGroup}]:
cmd [${targetNodes.nodeGroup}]:
- curl -fsSL ${baseUrl}/scripts/detect-os-and-install.sh | /bin/bash
user: root
sayYes: true
buttons:
- confirmText: Do you want to run a Scan of the full Node?
action: scan
loadingText: Starting scan...
caption: Scan Now
settings: config
actions:
scan:
- log: Start the Scan sub-addon
- install: ${baseUrl}/scripts/scan.jps
settings:
node: "${targetNodes.nodeGroup}"
expert: "${settings.expert}"
expert-command: "${settings.expert-command}"
include-dirs: "${settings.include-dirs}"
include-dirs-path: "${settings.include-dirs-path}"
enable-mounts: "${settings.enable-mounts}"
return:
type: info
message: Anti-Virus succesfully installed