Add RPM package SPEC ()

This commit is contained in:
udarnik386
2021-07-05 09:02:19 +03:00
committed by GitHub
parent dcb9882978
commit 2ca5dbf071
5 changed files with 179 additions and 0 deletions

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>librespeedgo</short>
<description>Libres speedtest service GO-version</description>
<port protocol="tcp" port="8989"/>
</service>

@@ -0,0 +1,29 @@
# bind address, use empty string to bind to all interfaces
bind_address=""
# backend listen port
listen_port=8989
# proxy protocol port, use 0 to disable
proxyprotocol_port=0
# Server location
server_lat=0
server_lng=0
# ipinfo.io API key, if applicable
ipinfo_api_key=""
# assets directory path, defaults to `assets` in the same directory
assets_path="/usr/share/librespeedgo/assets"
# password for logging into statistics page
statistics_password="PASSWORD"
# redact IP addresses
redact_ip_addresses=false
# database type for statistics data, currently supports: bolt, mysql, postgresql
database_type="bolt"
database_hostname=""
database_name=""
database_username=""
database_password=""
# if you use `bolt` as database, set database_file to database file location
database_file="/var/lib/librespeedgo/speedtest.db"

@@ -0,0 +1,29 @@
[Unit]
Description=Librespeed speed test
After=network.target
[Service]
Type=simple
User=librespeedgo
Group=librespeedgo
WorkingDirectory=/usr/share/librespeedgo/
ExecStart=/usr/bin/librespeedgo -c /etc/librespeedgo/settings.toml
DevicePolicy=closed
NoNewPrivileges=yes
PrivateTmp=yes
PrivateUsers=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictNamespaces=yes
RestrictRealtime=yes
ReadWritePaths=/var/lib/librespeedgo
ReadWritePaths=/etc/librespeedgo/settings.toml
PrivateDevices=yes
ProtectSystem=strict
ProtectHome=true
MemoryDenyWriteExecute=yes
[Install]
WantedBy=multi-user.target