fcnatfw/bin/fcnatwrap.in

31 lines
974 B
Bash

#!/bin/sh
#
# Copyright (C)2026 kimapr
#
# This file is part of fcnatfw.
#
# fcnatfw is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# fcnatfw is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
## PRELUDE_PLACEHOLDER ##
export LD_PRELOAD="$(
if test -z "$FCNATFW_INSTALLED"; then
printf '%s' "$(dirname "$(realpath "$(command -v "$0")")")/../lib/fcnatfwpshare.so"
else
printf '%s' "$FCNATFW_LIBDIR/fcnatfwpshare.so"
fi
)${LD_PRELOAD:+:}$LD_PRELOAD"
exec "$@"