fix(installer): Improve installation instructions for interactive and non-interactive setups
This commit is contained in:
parent
897e86ad60
commit
623b7ee51f
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# 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)
|
## 2025-03-25 - 2.4.5 - fix(install)
|
||||||
Improve interactive terminal detection and update installation instructions
|
Improve interactive terminal detection and update installation instructions
|
||||||
|
|
||||||
|
@ -74,9 +74,11 @@ if [ ! -t 0 ] || [ ! -t 1 ]; then
|
|||||||
if [ $INTERACTIVE -eq 0 ]; then
|
if [ $INTERACTIVE -eq 0 ]; then
|
||||||
echo "ERROR: No controlling terminal available for interactive prompts."
|
echo "ERROR: No controlling terminal available for interactive prompts."
|
||||||
echo "For interactive installation (RECOMMENDED):"
|
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 "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
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Interactive terminal found, continuing with prompts..."
|
echo "Interactive terminal found, continuing with prompts..."
|
||||||
|
20
readme.md
20
readme.md
@ -19,18 +19,22 @@ NUPST is a command-line tool that monitors SNMP-enabled UPS devices and initiate
|
|||||||
### Quick Install (One-line command)
|
### Quick Install (One-line command)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# RECOMMENDED: Install interactively using process substitution (requires root privileges)
|
# Method 1: Download and run (most reliable across all environments)
|
||||||
# This ensures proper interactive prompts for dependencies
|
curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh -o nupst-install.sh
|
||||||
sudo bash <(curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh)
|
sudo bash nupst-install.sh
|
||||||
|
```
|
||||||
|
|
||||||
# Alternative: Install with auto-yes for dependencies (will install git automatically if needed)
|
```bash
|
||||||
# Use this for automated/non-interactive installations
|
# Method 2: Pipe with automatic yes for dependencies (non-interactive)
|
||||||
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)
|
|
||||||
curl -sSL https://code.foss.global/serve.zone/nupst/raw/branch/main/install.sh | sudo bash -s -- -y
|
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
|
### Direct from Git
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/nupst',
|
name: '@serve.zone/nupst',
|
||||||
version: '2.4.5',
|
version: '2.4.6',
|
||||||
description: 'Node.js UPS Shutdown Tool for SNMP-enabled UPS devices'
|
description: 'Node.js UPS Shutdown Tool for SNMP-enabled UPS devices'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user