Generally functional. Added upload script
This commit is contained in:
38
setup_server.sh
Executable file
38
setup_server.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# One-time server setup script for Superball Thrower
|
||||
# Run this on the server as root or with sudo
|
||||
|
||||
set -e
|
||||
|
||||
echo "=== Superball Thrower Server Setup ==="
|
||||
|
||||
# Create user if it doesn't exist
|
||||
if ! id -u superball-thrower >/dev/null 2>&1; then
|
||||
echo "Creating user superball-thrower..."
|
||||
useradd -r -s /bin/bash -d /usr/local/bin/super_ball_thrower superball-thrower
|
||||
else
|
||||
echo "User superball-thrower already exists"
|
||||
fi
|
||||
|
||||
# Create directory structure
|
||||
echo "Creating directory structure..."
|
||||
mkdir -p /usr/local/bin/super_ball_thrower
|
||||
mkdir -p /var/log/superball-thrower
|
||||
|
||||
# Set ownership
|
||||
echo "Setting ownership..."
|
||||
chown -R superball-thrower:superball-thrower /usr/local/bin/super_ball_thrower
|
||||
chown -R superball-thrower:superball-thrower /var/log/superball-thrower
|
||||
|
||||
# Set permissions
|
||||
echo "Setting permissions..."
|
||||
chmod 755 /usr/local/bin/super_ball_thrower
|
||||
chmod 755 /var/log/superball-thrower
|
||||
|
||||
echo ""
|
||||
echo "=== Setup Complete ==="
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo "1. Copy your config.json to /usr/local/bin/super_ball_thrower/"
|
||||
echo "2. Install the systemd service file"
|
||||
echo "3. Run the deploy_lt.sh script to build and deploy the binary"
|
||||
Reference in New Issue
Block a user