-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvmcrawl.service
More file actions
55 lines (47 loc) · 1.11 KB
/
vmcrawl.service
File metadata and controls
55 lines (47 loc) · 1.11 KB
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
[Unit]
Description=vmcrawl
After=network-online.target postgresql.service
Wants=network-online.target
Documentation=https://github.com/vmstio/vmcrawl
[Service]
Type=simple
User=vmcrawl
Group=vmcrawl
WorkingDirectory=/opt/vmcrawl
# Use the shell script to handle virtualenv activation
ExecStart=/opt/vmcrawl/vmcrawl.sh
# Systemd-managed cache directory: /var/cache/vmcrawl (exported as $CACHE_DIRECTORY)
CacheDirectory=vmcrawl
CacheDirectoryMode=0700
# Restart policy
Restart=on-failure
RestartSec=30
# Resource limits
LimitNOFILE=65536
MemoryMax=4G
CPUQuota=80%
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
PrivateDevices=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/vmcrawl
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
ProtectClock=true
ProtectHostname=true
RestrictRealtime=true
RestrictNamespaces=true
RestrictSUIDSGID=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
LockPersonality=true
SystemCallArchitectures=native
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=vmcrawl
[Install]
WantedBy=multi-user.target