this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Git broke.

I'm not sure why it broke. Will fix later.

authored by

Henrick and committed by
GitHub
88d555b8 4c61a5f2

+58
+41
install-service.sh
··· 1 + #!/bin/bash 2 + 3 + # Check if running as root 4 + if [ "$EUID" -ne 0 ]; then 5 + echo "This script must be run as root (use sudo)" 6 + exit 1 7 + fi 8 + 9 + # Define file paths 10 + SERVICE_NAME="stagehand" 11 + SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 12 + SERVICE_FILE="$SCRIPT_DIR/$SERVICE_NAME.service" 13 + SYSTEMD_DIR="/etc/systemd/system" 14 + 15 + # Copy the service file 16 + echo "Copying $SERVICE_NAME.service to $SYSTEMD_DIR..." 17 + cp "$SERVICE_FILE" "$SYSTEMD_DIR/" 18 + 19 + # Set proper permissions 20 + echo "Setting permissions..." 21 + chmod 644 "$SYSTEMD_DIR/$SERVICE_NAME.service" 22 + 23 + # Reload systemd to recognize new service 24 + echo "Reloading systemd daemon..." 25 + systemctl daemon-reload 26 + 27 + # Enable the service 28 + echo "Enabling $SERVICE_NAME service..." 29 + systemctl enable "$SERVICE_NAME" 30 + 31 + echo "Service installation complete!" 32 + echo "You can start the service with: sudo systemctl start $SERVICE_NAME" 33 + echo "Check service status with: systemctl status $SERVICE_NAME" 34 + 35 + # Ask if the user wants to start the service now 36 + read -p "Do you want to start the service now? (y/n): " START_NOW 37 + if [[ "$START_NOW" =~ ^[Yy]$ ]]; then 38 + echo "Starting $SERVICE_NAME service..." 39 + systemctl start "$SERVICE_NAME" 40 + echo "Service started." 41 + fi
+17
stagehand.service
··· 1 + [Unit] 2 + Description=Stagehand Telegram bot service 3 + After=network.target 4 + 5 + [Service] 6 + Type=simple 7 + User=henrick 8 + WorkingDirectory=/home/henrick/stagehand 9 + ExecStart=/usr/bin/npm run start 10 + Restart=on-failure 11 + RestartSec=10 12 + StandardOutput=syslog 13 + StandardError=syslog 14 + SyslogIdentifier=stagehand 15 + 16 + [Install] 17 + WantedBy=multi-user.target