-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
路29 lines (23 loc) 路 841 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
路29 lines (23 loc) 路 841 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
#!/bin/bash
set -e
cd /opt/launchpad
# Create dedicated system user if it doesn't exist
if ! id launchpad &>/dev/null; then
useradd --system --no-create-home --shell /usr/sbin/nologin --groups docker launchpad
echo "Created user: launchpad"
else
# Make sure launchpad is in the docker group
usermod -aG docker launchpad
echo "User launchpad already exists, ensured docker group membership"
fi
# Files owned by invoking user, group-readable by launchpad
OWNER=$(stat -c '%U' /opt/launchpad)
chown -R "$OWNER":launchpad /opt/launchpad
chmod -R g+rX /opt/launchpad
python3 -m venv venv
venv/bin/pip install -r requirements.txt
cp launchpad.service /etc/systemd/system/launchpad.service
systemctl daemon-reload
systemctl enable launchpad
systemctl restart launchpad
echo "Launchpad is running at http://localhost:7777"