File size: 1,362 Bytes
dfb775d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# SPDX-License-Identifier: Apache-2.0
# (c) 2026 BANKON — all rights reserved.
#
# Systemd unit for running WordPress.agent directly under a virtualenv.
# Use this when you do not want the container layer.
#
# Install:
#   sudo cp deploy/systemd/wordpress-agent.service /etc/systemd/system/
#   sudo systemctl daemon-reload
#   sudo systemctl enable --now wordpress-agent.service
#   sudo systemctl status wordpress-agent.service

[Unit]
Description=WordPress.agent — agnostic publishing tool for mindX
Documentation=https://github.com/codephreak/wordpress-agent
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=wpagent
Group=wpagent
WorkingDirectory=/opt/wordpress-agent
EnvironmentFile=/etc/wordpress-agent/wordpress-agent.env
ExecStart=/opt/wordpress-agent/.venv/bin/wordpress-agent-server
Restart=on-failure
RestartSec=5s
TimeoutStopSec=30s
KillMode=mixed

# Hardening
NoNewPrivileges=true
PrivateTmp=true
PrivateDevices=true
ProtectSystem=strict
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=true
LockPersonality=true
MemoryDenyWriteExecute=true
ReadWritePaths=
ReadOnlyPaths=/etc/wordpress-agent

# Resource limits
LimitNOFILE=65536
MemoryMax=256M
CPUQuota=50%

[Install]
WantedBy=multi-user.target