-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-host.sh
More file actions
executable file
·37 lines (28 loc) · 935 Bytes
/
Copy pathsetup-host.sh
File metadata and controls
executable file
·37 lines (28 loc) · 935 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
#!/bin/bash
# Ghost Machines: Host Setup Script
# This script installs and configures LXCFS for accurate container resource reporting.
set -e
# OS Compatibility Check
if ! command -v apt-get &> /dev/null; then
echo "[ERROR] This script requires 'apt-get' (Debian/Ubuntu)."
echo "[INFO] If you are on macOS or another Linux distribution, please refer to the README for manual LXCFS setup."
exit 1
fi
echo "Starting host configuration..."
# 1. Update package list
sudo apt-get update
# 2. Install LXCFS
echo "Installing LXCFS..."
sudo apt-get install -y lxcfs
# 3. Enable and Start LXCFS service
echo "Configuring LXCFS service..."
sudo systemctl enable lxcfs
sudo systemctl start lxcfs
# 4. Verify installation
if systemctl is-active --quiet lxcfs; then
echo "LXCFS is installed and running."
else
echo "Error: LXCFS failed to start."
exit 1
fi
echo "Host setup complete. You can now run './start.sh'."