Atlas - install_server.sh

Home / usr / net / PulseWatch Lines: 1 | Size: 989 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1#!/bin/sh 2set -eu 3 4INSTALL_DIR="/opt/nexus/usr/net/PulseWatch" 5DATA_DIR="/var/lib/pulsewatch" 6SERVICE="/etc/systemd/system/pulsewatch-server.service" 7 8echo "[+] Installing PulseWatch server" 9 10# user 11if ! id pulsewatch >/dev/null 2>&1; then 12 useradd -r -s /usr/sbin/nologin pulsewatch 13fi 14 15# data dir 16mkdir -p "$DATA_DIR" 17chown pulsewatch:pulsewatch "$DATA_DIR" 18chmod 750 "$DATA_DIR" 19 20# permissions on code 21chown -R root:root "$INSTALL_DIR" 22chmod -R 755 "$INSTALL_DIR" 23 24# systemd service 25cat > "$SERVICE" <<EOF 26[Unit] 27Description=PulseWatch Server 28After=network.target 29 30[Service] 31ExecStart=/usr/bin/python3 ${INSTALL_DIR}/server.py 32WorkingDirectory=${INSTALL_DIR} 33User=pulsewatch 34Group=pulsewatch 35Restart=always 36RestartSec=3 37 38NoNewPrivileges=true 39PrivateTmp=true 40ProtectSystem=strict 41ProtectHome=true 42ReadWritePaths=${DATA_DIR} 43 44[Install] 45WantedBy=multi-user.target 46EOF 47 48systemctl daemon-reload 49systemctl enable --now pulsewatch-server 50 51echo "[+] PulseWatch server installed and running" 52
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.