File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -371,6 +371,7 @@ if [ -e /etc/rc.d/rc.unraid-api ]; then
371371 rm -f /etc/rc.d/rc.unraid-api
372372 rm -f /etc/rc.d/rc.flash_backup
373373 rm -f /usr/local/sbin/unraid-api
374+ rm -f /usr/local/bin/unraid-api
374375 rm -rf /usr/local/emhttp/plugins/dynamix.unraid.net
375376 rm -rf /usr/local/emhttp/plugins/dynamix.unraid.net.staging
376377 rm -f /etc/rc.d/rc6.d/K10_flash_backup
@@ -857,6 +858,8 @@ unraid_binary_path="/usr/local/bin/unraid-api"
857858# Install unraid-api
858859rm -rf "${api_base_directory}"
859860mkdir -p "${api_base_directory}"
861+ # Create log directory (PM2 will not start without it)
862+ mkdir -p /var/log/unraid-api
860863tar -C "${api_base_directory}" -xzf "${flash}/unraid-api.tgz" --strip 1
861864# Copy env file
862865cp "${api_base_directory}/.env.${env}" "${api_base_directory}/.env"
870873 echo "Note: ${flash}/webComps/unraid.min.js is missing"
871874fi
872875npm link "${api_base_directory}" --force
876+ # Create symlink to unraid-api binary (to allow usage elsewhere)
877+ ln -sf /usr/local/bin/unraid-api /usr/local/sbin/unraid-api
873878# bail if expected file does not exist
874879[[ ! -f "${api_base_directory}/package.json" ]] && echo "unraid-api install failed" && exit 1
875880
You can’t perform that action at this time.
0 commit comments