0
Fork 0
mirror of https://github.com/netweak/agent.git synced 2024-12-30 22:33:52 -05:00

Fix path resolution

This commit is contained in:
Lucas Decrock 2024-11-03 05:12:48 +01:00
parent 64e3a406ae
commit 1834c8806c
2 changed files with 4 additions and 2 deletions

View file

@ -4,7 +4,8 @@
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Get the directory name
NETWEAK=$(basename $(dirname $0))
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
NETWEAK="$(basename "$SCRIPT_DIR")"
# Agent version
if [ -f "/etc/$NETWEAK/version" ]; then

View file

@ -4,7 +4,8 @@
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Get the directory name
NETWEAK=$(basename $(dirname $0))
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
NETWEAK="$(basename "$SCRIPT_DIR")"
# API Token
if [ -f "/etc/$NETWEAK/token.conf" ]; then