diff --git a/scripts/b2b.systemd b/scripts/b2b.systemd new file mode 100644 index 0000000..36c8404 --- /dev/null +++ b/scripts/b2b.systemd @@ -0,0 +1,28 @@ +#LimitNOFILE=65535 + +RestartSec=2s +Type=simple +User=baggib2b +Group=baggib2b +WorkingDirectory=/opt/baggib2b/ +ExecStart=/opt/baggib2b/baggib2b -dbname baggib2b -dbhost 127.0.0.1 -devmode=true -port 15801 +Restart=always + +#Environment=USER=baggib2b HOME=/opt/baggib2b =/opt/baggib2b + +# enable to bind to a port below 1024 uncomment +### +#CapabilityBoundingSet=CAP_NET_BIND_SERVICE +#AmbientCapabilities=CAP_NET_BIND_SERVICE + +# Prevent writes to /usr, /boot, and /etc +ProtectSystem=full + +# Prevent accessing /home, /root and /run/user +ProtectHome=true + +# Execute pre and post scripts as root, otherwise it does it as User= +PermissionsStartOnly=true + +[Install] +WantedBy=multi-user.target