clamd_for_centos 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/clamd_for_centos.rb +6 -6
- data/lib/clamd_for_centos/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d519e445411d1f06d17cf3e74307f519cef19b55451a639647becd5ee5fdf45c
|
4
|
+
data.tar.gz: 466b050995b1cc998df781a825b1e8348f0805278ef6ee1be606f50e502abb32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ade42f181ca8be3303200e998df85c8ff081259b3d56f30e0f1623bfb70bf937ff745dd705060f6e6cbde96bf64899747639f8a61e22ab3ec043d7e021b07937
|
7
|
+
data.tar.gz: d56103c4ee5c9eae2b31a234e52f4d079af013dd20994826671bd75696e36312e5eca9736e953a9a29085aaec57806b6b19f9b05181d38139292d0a3e3aef91e
|
data/lib/clamd_for_centos.rb
CHANGED
@@ -3,16 +3,16 @@ require "clamd_for_centos/version"
|
|
3
3
|
module ClamdForCentos
|
4
4
|
# Your code goes here...
|
5
5
|
def self.setup
|
6
|
-
status = system("yum -y install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd")
|
6
|
+
status = system("sudo yum -y install clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd")
|
7
7
|
if status == true
|
8
|
-
file_edit = system("sed -i -e 's/^Example/#Example/' /etc/clamd.d/scan.conf")
|
8
|
+
file_edit = system("sudo sed -i -e 's/^Example/#Example/' /etc/clamd.d/scan.conf")
|
9
9
|
f = File.open('/etc/clamd.d/scan.conf', 'a')
|
10
10
|
f.write('LocalSocket /var/run/clamd.scan/clamd.sock')
|
11
11
|
f.close
|
12
|
-
file_fresh_clam = system("sed -i -e 's/^Example/#Example/' /etc/freshclam.conf")
|
13
|
-
system("freshclam")
|
14
|
-
system("systemctl start clamd@scan")
|
15
|
-
system("systemctl enable clamd@scan")
|
12
|
+
file_fresh_clam = system("sudo sed -i -e 's/^Example/#Example/' /etc/freshclam.conf")
|
13
|
+
system("sudo freshclam")
|
14
|
+
system("sudo systemctl start clamd@scan")
|
15
|
+
system("sudo systemctl enable clamd@scan")
|
16
16
|
else
|
17
17
|
puts "rerun with sudo"
|
18
18
|
end
|