-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_service
More file actions
executable file
·32 lines (24 loc) · 888 Bytes
/
install_service
File metadata and controls
executable file
·32 lines (24 loc) · 888 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
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Installing cc-exp-runner as systemd service..."
# Create logs directory
mkdir -p "$ROOT/logs"
# Copy service file to systemd
sudo cp "$ROOT/cc-exp-runner.service" /etc/systemd/system/
# Reload systemd
sudo systemctl daemon-reload
# Enable service (auto-start on boot)
sudo systemctl enable cc-exp-runner
# Start service now
sudo systemctl start cc-exp-runner
echo ""
echo "Service installed and started!"
echo ""
echo "Commands:"
echo " sudo systemctl status cc-exp-runner # Check status"
echo " sudo systemctl stop cc-exp-runner # Stop"
echo " sudo systemctl start cc-exp-runner # Start"
echo " sudo systemctl restart cc-exp-runner # Restart"
echo " journalctl -u cc-exp-runner -f # View logs"
echo " tail -f $ROOT/logs/listener.log # View logs (file)"