Compare commits

..

No commits in common. "d57b5207c44b8b2c478ae7a2f1c9f9c70cd6eaf7" and "c844ec61dbdd49d0847fb0c12c6dda8aa5d287d6" have entirely different histories.

3 changed files with 7 additions and 28 deletions

View file

@ -1,19 +0,0 @@
# server listening to
#SPEEDTEST_ADDRESS=127.0.0.1
#SPEEDTEST_PORT=8000
# certificats and public key
# those to option are mandatory if you want tu active TLS support
#SPEEDTEST_CERT=/path/to/public.crt
#SPEEDTEST_KEY=/path/to/private.key
# optional CA to validate client
#SPEEDTEST_CA_CERT=/path/to/ca.crt
# Directory with HTML/js files
#SPEEDTEST_DIR=/usr/lib/speedtest-rs
# https://ipinfo.io/ token to use this service
#IPINFO_TOKEN=
# to get distance between client and server we need to know the server coordonate
#SPEEDTEST_LATITUDE=0.0
#SPEEDTEST_LONGITUDE=0.0

View file

@ -6,9 +6,9 @@ After=network.target
[Service] [Service]
User=speedtest User=speedtest
Group=speedtest Group=speedtest
Environment=SPEEDTEST_LATITUDE=0.0 SPEEDTEST_LONGITUDE=0.0 SPEEDTEST_ADDRESS=127.0.0.1 SPEEDTEST_DIR=/usr/lib/speedtest-rs SPEEDTEST_PORT=8000 Environment=LATITUDE=0.0 LONGITUDE=0.0 SPEEDTEST_DIR=/var/lib/speedtest-rs SPEEDTEST_PORT=80
EnvironmentFile=-/etc/speedtest-rs/config.env EnvironmentFile=-/etc/speedtest-rs/config.sh
ExecStart=/usr/bin/speedtest-rs --ip=${SPEEDTEST_ADDRESS} --port=${SPEEDTEST_PORT} --assets=${SPEEDTEST_DIR} --ipinfo_token=${IPINFO_TOKEN} --latitude=${SPEEDTEST_LATITUDE} --longitude=${SPEEDTEST_LONGITUDE} --cert=${SPEEDTEST_CERT} --key=${SPEEDTEST_KEY} --ca_cert=${SPEEDTEST_CA_CERT} ExecStart=/usr/bin/speedtest-rs --ip=0.0.0.0 --port=${SPEEDTEST_PORT} --assets=${SPEEDTEST_DIR} --ipinfo_token=${IPINFO_TOKEN} --latitude=${LATITUDE} --longitude=${LONGITUDE} --cert=${SPEEDTEST_CERT} --key=${SPEEDTEST_KEY} --ca_cert=${SPEEDTEST_CA_CERT}
PrivateTmp=true PrivateTmp=true
PrivateDevices=true PrivateDevices=true
ProtectHome=true ProtectHome=true

View file

@ -10,7 +10,6 @@ URL: %{repo}
Source0: %{repo}/archive/%{version}.tar.gz Source0: %{repo}/archive/%{version}.tar.gz
Source1: speedtest-rs.service Source1: speedtest-rs.service
Source2: speedtest-rs.sysusers Source2: speedtest-rs.sysusers
Source3: config.env
BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(openssl)
BuildRequires: systemd BuildRequires: systemd
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
@ -27,11 +26,10 @@ cargo build --release
%install %install
install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}%{_sysconfdir}/%{name}
install -Dpm 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}
install -Dpm 755 target/release/speedtest-rs %{buildroot}%{_bindir}/speedtest-rs install -Dpm 755 target/release/speedtest-rs %{buildroot}%{_bindir}/speedtest-rs
install -d %{buildroot}%{_libdir}/%{name} install -d %{buildroot}%{_sharedstatedir}/%{name}
install -Dpm 644 assets/* %{buildroot}%{_libdir}/%{name} install -Dpm 644 assets/* %{buildroot}%{_sharedstatedir}/%{name}
ln -s example-singleServer-full.html %{buildroot}%{_libdir}/%{name}/index.html ln -s example-singleServer-full.html %{buildroot}%{_sharedstatedir}/%{name}/index.html
install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/speedtest-rs.service install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/speedtest-rs.service
install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/speedtest-rs.conf install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/speedtest-rs.conf
@ -39,7 +37,7 @@ install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/speedtest-rs.conf
%license LICENSE %license LICENSE
%{_sysconfdir}/%{name} %{_sysconfdir}/%{name}
%{_bindir}/speedtest-rs %{_bindir}/speedtest-rs
%{_libdir}/%{name} %{_sharedstatedir}/%{name}
%{_unitdir}/speedtest-rs.service %{_unitdir}/speedtest-rs.service
%{_sysusersdir}/speedtest-rs.conf %{_sysusersdir}/speedtest-rs.conf