diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2017-05-30 20:59:31 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2017-05-30 20:59:31 +0200 |
commit | bba25e2ff6c4a193acb54560ea4417537bd2954e (patch) | |
tree | 9e074fe343f9ab6f5ce1e9c5142d9a6cf180fcda /testing/hosts/default/usr | |
parent | 05ddd767992d68bb38c7f16ece142e8c2e9ae016 (diff) | |
download | vyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.tar.gz vyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.zip |
New upstream version 5.5.3
Diffstat (limited to 'testing/hosts/default/usr')
-rwxr-xr-x | testing/hosts/default/usr/local/bin/service | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/hosts/default/usr/local/bin/service b/testing/hosts/default/usr/local/bin/service new file mode 100755 index 000000000..c5db4f61b --- /dev/null +++ b/testing/hosts/default/usr/local/bin/service @@ -0,0 +1,22 @@ +#!/bin/bash +# +# LEAK_DETECTIVE_LOG is set for automated runs, however, `service` strips +# the environment. This wrapper is used to set the variable for the charon +# init script. + +ORIG=/usr/sbin/service +CONF=/etc/default/charon + +if [[ "$1" != "charon" ]]; then + $ORIG "$@" +fi + +if [[ "$2" == "start" && -n $LEAK_DETECTIVE_LOG ]]; then + echo "export LEAK_DETECTIVE_LOG=$LEAK_DETECTIVE_LOG" >> $CONF +fi + +$ORIG "$@" + +if [[ "$2" == "stop" ]]; then + sed -i '/LEAK_DETECTIVE_LOG/d' $CONF 2>/dev/null +fi |