NapCatQQ/script/napcat.sh

22 lines
408 B
Bash
Raw Normal View History

2024-04-14 16:09:08 +00:00
#!/bin/bash
2024-05-13 08:57:03 +00:00
get_script_dir() {
local script_path="${1:-$0}"
local script_dir
script_path=$(readlink -f "$script_path")
script_dir=$(dirname "$script_path")
echo "$script_dir"
}
SCRIPT_DIR=$(get_script_dir)
2024-05-13 10:39:59 +00:00
export ELECTRON_RUN_AS_NODE=1
2024-05-13 08:57:03 +00:00
if ! [ -x /opt/QQ/qq ]; then
echo "Error: /opt/QQ/qq is not executable or does not exist." >&2
exit 1
fi
/opt/QQ/qq "${SCRIPT_DIR}/napcat.cjs" "$@"