diff --git a/systemd_units/pyrobud.service b/systemd_units/pyrobud.service new file mode 100644 index 0000000..b53d1d7 --- /dev/null +++ b/systemd_units/pyrobud.service @@ -0,0 +1,35 @@ +[Unit] +Description=Pyrobud Telegram selfbot +After=multi-user.target + +[Service] +# Base settings +Type=simple +Restart=always +RestartSec=10 + +# Execution parameters +User=pyrobud +Group=pyrobud +WorkingDirectory=/home/pyrobud/pyrobud +ExecStart=/home/pyrobud/pyrobud/venv/bin/python -O /home/pyrobud/pyrobud/main.py + +# Limit damage in case something goes awry +MemoryLimit=256M +CPUQuota=200% + +# Security +PrivateTmp=true +ProtectSystem=full +NoNewPrivileges=true +ProtectControlGroups=true +ProtectKernelModules=true +ProtectKernelTunables=true +PrivateDevices=true +RestrictAddressFamilies=AF_INET AF_INET6 +RestrictNamespaces=true +RestrictRealtime=true +SystemCallArchitectures=native + +[Install] +WantedBy=multi-user.target diff --git a/systemd_units/update.sh b/systemd_units/update.sh index 8e25bcb..8945e66 100755 --- a/systemd_units/update.sh +++ b/systemd_units/update.sh @@ -8,7 +8,7 @@ function prettyPrint() { } # Grab all service names -declare -a services=('caddy' 'goaccess' 'mirror-bot' 'mirror-bot-2' 'uno-bot' 'walls-bot' 'walls-bot-rs') +declare -a services=('caddy' 'goaccess' 'mirror-bot' 'mirror-bot-2' 'uno-bot' 'pyrobud' 'walls-bot' 'walls-bot-rs') declare -a timers=('goaccess-update') # Now loop through each service and install it