mirror of
https://github.com/msfjarvis/server-config
synced 2025-08-13 22:57:01 +05:30
systemd_units: Add walls-bot-rs
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
a060b4630e
commit
2cbf1ecb88
2 changed files with 32 additions and 1 deletions
|
@ -8,7 +8,7 @@ function prettyPrint() {
|
|||
}
|
||||
|
||||
# Grab all service names
|
||||
declare -a services=('caddy' 'goaccess' 'mirror-bot' 'mirror-bot-2' 'mkr-bin' 'uno-bot' 'walls-bot')
|
||||
declare -a services=('caddy' 'goaccess' 'mirror-bot' 'mirror-bot-2' 'mkr-bin' 'uno-bot' 'walls-bot' 'walls-bot-rs')
|
||||
|
||||
# Now loop through each service and install it
|
||||
for service in "${services[@]}"; do
|
||||
|
|
31
systemd_units/walls-bot-rs.service
Normal file
31
systemd_units/walls-bot-rs.service
Normal file
|
@ -0,0 +1,31 @@
|
|||
[Unit]
|
||||
Description=walls-bot-rs service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Restart=on-abort
|
||||
Type=simple
|
||||
User=bot
|
||||
EnvironmentFile=/home/bot/walls-bot-rs/env
|
||||
WorkingDirectory=/home/bot/walls-bot-rs
|
||||
ExecStart=/home/bot/.cargo/bin/cargo run
|
||||
ExecReload=/bin/kill -USR1 $MAINPID
|
||||
KillMode=mixed
|
||||
KillSignal=SIGQUIT
|
||||
TimeoutStopSec=5s
|
||||
|
||||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue