sgx-daemon/scripts/install_daemon.sh
Noor 7e4ab4dd52
Update install script
updated detee-shared version
fix daemon upgrade logging
add installation script for detee-sgx-daemon
2025-03-27 10:09:15 +00:00

32 lines
1.2 KiB
Bash

#!/bin/bash
set -e
if ! lscpu | grep -qi "sgx"; then
echo "SGX is not enabled. Please enable it in the BIOS."
exit 1
fi
if ! command -v docker &> /dev/null; then
echo "Error: Docker is not installed."
echo "Please install Docker by following the instructions at https://docs.docker.com/get-docker/"
exit 1
fi
echo "Creating folders..."
mkdir -p /usr/local/bin/detee/
mkdir -p /etc/detee/app_daemon/
echo "Downloading detee-sgx-daemon, systemd unit file and config..."
wget -q --show-progress -O /usr/local/bin/detee-sgx-daemon https://registry.detee.ltd/sgx/daemon/detee-sgx-daemon
wget -q --show-progress -O /etc/systemd/system/detee-sgx-daemon.service https://registry.detee.ltd/sgx/daemon/detee-sgx-daemon.service
wget -q --show-progress -O /etc/detee/app_daemon/sample_config.yaml https://registry.detee.ltd/sgx/daemon/sample_config.yaml
chmod +x /usr/local/bin/detee-sgx-daemon
echo "Take a look at /etc/detee/app_daemon/sample_config.yaml"
echo "Modify config based on your setup and save it to /etc/detee/app_daemon/config.yaml"
echo "Press enter when done (this will attempt to start the daemon)"
read my_var
echo "Starting detee-sgx-daemon..."
systemctl daemon-reload
systemctl start detee-sgx-daemon.service