Skip to content

Commit

Permalink
Fix strongswan.service for RPM
Browse files Browse the repository at this point in the history
Signed-off-by: Feras Bisharat <fbisharat@nvidia.com>
  • Loading branch information
ferasbi committed Nov 23, 2023
1 parent 52c2ce1 commit b99d790
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions strongswan.spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Linux Kernel.
%prep
%setup
cp -f systemd-conf/strongswan-starter.service.in.centos init/systemd-starter/strongswan-starter.service.in
cp -f systemd-conf/strongswan.service.in.centos init/systemd/strongswan.service.in

%build
%configure \
Expand Down
14 changes: 14 additions & 0 deletions systemd-conf/strongswan.service.in.centos
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf
After=syslog.target network-online.target

[Service]
ExecStartPre=/bin/cp -f /etc/pki/tls/openssl.cnf.orig /etc/pki/tls/openssl.cnf
ExecStart=@SBINDIR@/@IPSEC_SCRIPT@ start --nofork
ExecStartPost=/bin/sleep 2
ExecStartPost=/bin/bash -c 'if lscpu | grep Flags | grep sha1 | grep sha2 | grep -q aes 2>/dev/null; then /bin/cp -f /etc/pki/tls/openssl.cnf.mlnx /etc/pki/tls/openssl.cnf; fi'
StandardOutput=syslog
Restart=on-abnormal

[Install]
WantedBy=multi-user.target

0 comments on commit b99d790

Please sign in to comment.