Update shm_actions_script.sh

This commit is contained in:
Bkeenke 2025-02-06 17:25:58 +03:00 committed by GitHub
parent 7e855d684d
commit 224a5a9997
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,10 +17,6 @@ case $EVENT in
sudo bash -c "$(curl -sL https://raw.githubusercontent.com/bkeenke/awg-manager/master/init.sh)" @ install >> /dev/null
echo
SERVER_HOST="{{ server.settings.host_name }}"
SERVER_INTERFACE="{{ server.settings.interface }}"
if [[ -z "$SERVER_INTERFACE" ]]; then
SERVER_INTERFACE=$(ip route | awk '/default/ {print $5; exit}')
fi
if [ -z $SERVER_HOST ]; then
SERVER_HOST="{{ server.settings.host }}"
fi
@ -36,11 +32,7 @@ case $EVENT in
echo "Init server"
chmod 700 $AWG_MANAGER
if [ $SERVER_INTERFACE ]; then
$AWG_MANAGER -i -s $SERVER_HOST -I $SERVER_INTERFACE
else
$AWG_MANAGER -i -s $SERVER_HOST
fi
;;
CREATE)
echo "Create new user"