2022-02-19 17:53:49 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Jenkins Continuous Integration Server
|
|
|
|
Requires=network.target
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
NotifyAccess=main
|
2022-03-12 07:35:20 +00:00
|
|
|
ExecStart=/usr/bin/java -Djava.awt.headless=true -Xmx512m -Djava.net.preferIPv4Stack=true -jar /usr/share/java/jenkins.war --httpPort=22010 --httpListenAddress=127.0.0.1
|
2022-02-19 17:53:49 +00:00
|
|
|
Restart=always
|
|
|
|
RestartSec=10
|
|
|
|
|
|
|
|
User=jenkins
|
|
|
|
Group=jenkins
|
|
|
|
|
|
|
|
Environment="JENKINS_HOME=/var/lib/jenkins"
|
|
|
|
WorkingDirectory=/var/lib/jenkins
|
|
|
|
|
|
|
|
LimitNOFILE=8192
|
|
|
|
LimitNPROC=256
|
|
|
|
|
|
|
|
UMask=0022
|
|
|
|
|
|
|
|
NoNewPrivileges=true
|
|
|
|
ProtectSystem=true
|
|
|
|
ReadOnlyPaths=/
|
|
|
|
ReadWritePaths=${' '.join(sorted(read_write_paths))}
|
|
|
|
PrivateTmp=true
|
|
|
|
PrivateDevices=true
|
|
|
|
PrivateUsers=true
|
|
|
|
ProtectHostname=true
|
|
|
|
ProtectClock=true
|
|
|
|
ProtectKernelTunables=true
|
|
|
|
ProtectKernelModules=true
|
|
|
|
ProtectKernelLogs=true
|
|
|
|
ProtectControlGroups=true
|
|
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|