fix(installer): Improve installation instructions for interactive and non-interactive setups

This commit is contained in:
Philipp Kunz 2025-03-25 13:15:48 +00:00
parent 897e86ad60
commit 623b7ee51f
4 changed files with 23 additions and 11 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## 2025-03-25 - 2.4.6 - fix(installer)
Improve installation instructions for interactive and non-interactive setups
- Changed install.sh to require explicit download of the install script and updated error messages for non-interactive modes
- Updated readme.md to include three distinct installation methods with clear command examples
## 2025-03-25 - 2.4.5 - fix(install)
Improve interactive terminal detection and update installation instructions

View File

@ -74,9 +74,11 @@ if [ ! -t 0 ] || [ ! -t 1 ]; then
if [ $INTERACTIVE -eq 0 ]; then
echo "ERROR: No controlling terminal available for interactive prompts."
echo "For interactive installation (RECOMMENDED):"
echo " sudo bash <(curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh)"
echo " curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh -o nupst-install.sh"
echo " sudo bash nupst-install.sh"
echo ""
echo "For non-interactive installation with automatic dependency installation:"
echo " sudo bash <(curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh) -y"
echo " curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | sudo bash -s -- -y"
exit 1
else
echo "Interactive terminal found, continuing with prompts..."

View File

@ -19,18 +19,22 @@ NUPST is a command-line tool that monitors SNMP-enabled UPS devices and initiate
### Quick Install (One-line command)
```bash
# RECOMMENDED: Install interactively using process substitution (requires root privileges)
# This ensures proper interactive prompts for dependencies
sudo bash <(curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh)
# Method 1: Download and run (most reliable across all environments)
curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh -o nupst-install.sh
sudo bash nupst-install.sh
```
# Alternative: Install with auto-yes for dependencies (will install git automatically if needed)
# Use this for automated/non-interactive installations
sudo bash <(curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh) -y
# For systems where process substitution is not available (e.g., some older shells)
```bash
# Method 2: Pipe with automatic yes for dependencies (non-interactive)
curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | sudo bash -s -- -y
```
```bash
# Method 3: Process substitution (only on systems that support /dev/fd/)
# Note: This may fail on some systems with "No such file or directory" errors
sudo bash <(curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh)
```
### Direct from Git
```bash

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@serve.zone/nupst',
version: '2.4.5',
version: '2.4.6',
description: 'Node.js UPS Shutdown Tool for SNMP-enabled UPS devices'
}