forked from HowieDuhzit/Eliza-Installer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
45 lines (34 loc) · 979 Bytes
/
install.sh
File metadata and controls
45 lines (34 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -e
set -o pipefail
umask 022
# Prevent interactive prompts during installation
export DEBIAN_FRONTEND=noninteractive
# Variables
NVM_VERSION=v0.39.1
NODE_VERSION=23.3.0
# Server admin (gets root via sudo)
USER=shrike
# The user the agent runs as
SERVICE_USER=eliza
AGENT_REPO=https://github.com/ai16z/eliza.git
INSTALL_DIR=/opt/eliza
SCRIPT_DIR=./scripts
LOG_DIR=/var/log/eliza
LOG_FILE=$LOG_DIR/install.log
# Create install log file
mkdir -p $LOG_DIR
touch $LOG_FILE
chmod 640 $LOG_FILE
# Export variables for subscripts
# TODO, yuck this is ugly
export NVM_VERSION NODE_VERSION USER SERVICE_USER AGENT_REPO INSTALL_DIR LOG_DIR LOG_FILE
# Run provisioning scripts in order
for script in "$SCRIPT_DIR"/[0-9][0-9]-*.sh; do
if [ -f "$script" ]; then
echo "Running $(basename "$script")..."
bash "$script" 2>&1 | tee -a "$LOG_FILE"
echo "Completed $(basename "$script")"
fi
done
echo "Installation completed successfully!"