From 7d300c4c70f3dae1a133c6e0f2a351d0f85f8d52 Mon Sep 17 00:00:00 2001 From: Daniel Steiner Date: Sun, 20 Jan 2019 11:32:10 +0100 Subject: [PATCH] index.html file redesigned. index.html replaced be new design --- fedora/SPECS/echoip.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fedora/SPECS/echoip.spec b/fedora/SPECS/echoip.spec index 95005e9..a88127f 100644 --- a/fedora/SPECS/echoip.spec +++ b/fedora/SPECS/echoip.spec @@ -19,6 +19,7 @@ License: BSD 3-Clause license URL: https://github.com/mpolden/%{name} Source0: %name-%{version}.%{gitv}.tgz Source1: %name.service +Source2: echoip-index.html BuildRequires: golang BuildRequires: go-compilers-golang-compiler @@ -53,13 +54,14 @@ export PATH=$SAVEPATH %install # modifying index.html file for required settings: -sed -i -e 's/.. .Host ../%{domain}/g' index.html -sed -i -e 's/http /%{protocol} /g' index.html +sed -i -e 's|.. .Host ..|%{protocol}://%{domain}|g' index.html sed -i -e 's/8080/%{port}/g' index.html -sed -i -e 's/height="350"/height="600"/g' index.html install -d -m 0770 %{buildroot}%{_rundir}/%{name} install -D -m 0775 %{gopath}/bin/echoip %{buildroot}%{_bindir}/%{name} -install -D -m 0644 index.html %{buildroot}%{webd}/%{name}/index.html +install -D -m 0644 index.html %{buildroot}%{webd}/%{name}/orig-index.html +install -D -m 0644 %{SOURCE2} %{buildroot}%{webd}/%{name}/index.html +sed -i -e 's|.. .Host ..|%{protocol}://%{domain}|g' %{buildroot}%{webd}/%{name}/index.html +sed -i -e 's/8080/%{port}/g' %{buildroot}%{webd}/%{name}/index.html install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service %clean @@ -108,6 +110,7 @@ fi %{_bindir}/%{name} %dir %attr(-,%{name},%{name}) %{webd}/%{name} %attr(-,%{name},%{name}) %{webd}/%{name}/index.html +%attr(-,%{name},%{name}) %{webd}/%{name}/orig-index.html %{_unitdir}/%{name}.service %dir %attr(-,%{name},%{name}) %{_rundir}/%{name}