Skip to content

Commit ce006a9

Browse files
committed
DEVOPS-1218 fix permissions for openvpn
Modified the systemd file to change the owner to nobody:nogroup so that a crl.pem change will not result in a hang on the server starting.
1 parent 7790bea commit ce006a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

certs/templates/user_data.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ runcmd:
66
- echo "push \"route ${cidrhost(element(split(",",route_cidrs),2), 0)} ${cidrnetmask(element(split(",",route_cidrs),2))}\"" >> /etc/openvpn/server.conf
77
- echo "push \"route ${cidrhost(element(split(",",route_cidrs),3), 0)} ${cidrnetmask(element(split(",",route_cidrs),3))}\"" >> /etc/openvpn/server.conf
88
- echo "push \"route ${cidrhost(element(split(",",route_cidrs),4), 0)} ${cidrnetmask(element(split(",",route_cidrs),4))}\"" >> /etc/openvpn/server.conf
9+
- sed -i 's/\(ExecStartPost=.*chmod.*$\)/ExecStartPost=\/bin\/chown -R nobody:nogroup \/etc\/openvpn\n\1\n/g' /etc/systemd/system/get-openvpn-certs.service
10+
- systemctl daemon-reload
911
- systemctl start get-openvpn-certs
1012
- systemctl restart openvpn@server
1113
- systemctl restart iptables

0 commit comments

Comments
 (0)