This commit is contained in:
Your Name
2025-09-29 09:39:14 -04:00
parent 3edc477069
commit e6bef22494
2 changed files with 17 additions and 8 deletions

View File

@@ -62,6 +62,16 @@ NPM_VERSION=$(npm --version)
echo "✅ Node.js $NODE_VERSION installed"
echo "✅ npm $NPM_VERSION installed"
# Create system-wide symlinks for Node.js and npm
echo "🔗 Creating system-wide Node.js symlinks..."
NODE_PATH=$(which node)
NPM_PATH=$(which npm)
sudo ln -sf "$NODE_PATH" /usr/local/bin/node
sudo ln -sf "$NPM_PATH" /usr/local/bin/npm
echo "✅ Node.js symlinks created"
# Install npm dependencies
echo "📦 Installing npm dependencies..."
if ! npm install; then
@@ -197,10 +207,8 @@ if [ -z "$PRIVATE_KEY" ]; then
echo "🔑 Initializing daemon to generate keypair..."
# Create a simple init script that generates keypair
sudo -u "$DAEMON_USER" bash -c "
export NVM_DIR=\"$HOME/.nvm\"
[ -s \"\$NVM_DIR/nvm.sh\" ] && \. \"\$NVM_DIR/nvm.sh\"
cd \"$INSTALL_DIR\"
node -e \"
/usr/local/bin/node -e \"
const { generateSecretKey, getPublicKey } = require('nostr-tools/pure');
const fs = require('fs');
const config = JSON.parse(fs.readFileSync('config.json', 'utf8'));