Enable auto service restart on upgrade
This commit is contained in:
		
							
								
								
									
										14
									
								
								gitea.spec
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								gitea.spec
									
									
									
									
									
								
							| @@ -5,7 +5,7 @@ ExclusiveArch:  %{go_arches} | |||||||
|  |  | ||||||
| Name:           gitea | Name:           gitea | ||||||
| Version:        1.9.6 | Version:        1.9.6 | ||||||
| Release:        1%{?dist} | Release:        2%{?dist} | ||||||
| Summary:        Gitea: Git with a cup of tea | Summary:        Gitea: Git with a cup of tea | ||||||
|  |  | ||||||
| License:        MIT | License:        MIT | ||||||
| @@ -71,6 +71,15 @@ rm -rf %{buildroot} | |||||||
| getent passwd gitea > /dev/null 2>&1 || useradd -r -d /var/lib/gitea -s /bin/bash gitea | getent passwd gitea > /dev/null 2>&1 || useradd -r -d /var/lib/gitea -s /bin/bash gitea | ||||||
|  |  | ||||||
|  |  | ||||||
|  | %post | ||||||
|  | if [ -x /usr/bin/systemctl ] | ||||||
|  | then | ||||||
|  |   systemctl condrestart gitea | ||||||
|  | elif [ -x /usr/sbin/service ] | ||||||
|  | then | ||||||
|  |   service gitea condrestart | ||||||
|  | fi | ||||||
|  |  | ||||||
| %files | %files | ||||||
| %license src/code.gitea.io/gitea/LICENSE | %license src/code.gitea.io/gitea/LICENSE | ||||||
| %doc src/code.gitea.io/gitea/CHANGELOG.md | %doc src/code.gitea.io/gitea/CHANGELOG.md | ||||||
| @@ -87,6 +96,9 @@ getent passwd gitea > /dev/null 2>&1 || useradd -r -d /var/lib/gitea -s /bin/bas | |||||||
|  |  | ||||||
|  |  | ||||||
| %changelog | %changelog | ||||||
|  | * Sun Nov 17 2019 Jason Rothstein | ||||||
|  | - Restart the service it is already running | ||||||
|  |  | ||||||
| * Sat Nov 16 2019 Jason Rothstein | * Sat Nov 16 2019 Jason Rothstein | ||||||
| - version bump 1.9.6 | - version bump 1.9.6 | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user