Autorestart if upgrading and already running

This commit is contained in:
Jason Rothstein 2019-11-17 23:27:33 -06:00
parent de319c44f2
commit 5606cb960a

View File

@ -5,7 +5,7 @@ ExclusiveArch: %{go_arches}
Name: gogs Name: gogs
Version: 0.11.91 Version: 0.11.91
Release: 2%{?dist} Release: 3%{?dist}
Summary: Go GIT Server Summary: Go GIT Server
License: MIT License: MIT
@ -112,6 +112,16 @@ cd src/github.com/gogs/gogs
getent passwd gogs > /dev/null 2>&1 || useradd -r -d /var/lib/gogs -s /bin/bash gogs getent passwd gogs > /dev/null 2>&1 || useradd -r -d /var/lib/gogs -s /bin/bash gogs
%post
if [ -x /usr/bin/systemctl ]
then
systemctl condrestart gitea
elif [ -x /usr/sbin/service ]
then
service gitea condrestart
fi
%files %files
%license src/github.com/gogs/gogs/LICENSE %license src/github.com/gogs/gogs/LICENSE
%doc src/github.com/gogs/gogs/README.md %doc src/github.com/gogs/gogs/README.md
@ -127,6 +137,9 @@ getent passwd gogs > /dev/null 2>&1 || useradd -r -d /var/lib/gogs -s /bin/bash
%changelog %changelog
* Sun Nov 17 2019 Jason Rothstein
- autorestart if upgrading and already running
* Sun Sep 22 2019 Jason Rothstein * Sun Sep 22 2019 Jason Rothstein
- recompile - recompile