diff --git a/netoik-git.spec b/netoik-git.spec index 83a3d36..1aed407 100644 --- a/netoik-git.spec +++ b/netoik-git.spec @@ -22,6 +22,9 @@ Install the Git server called Gitea. %make_install %post +# Display commands and exit on error +set -xe + # Create gitea user if ! id gitea >/dev/null 2>&1; then useradd --base-dir %{_sharedstatedir} --create-home --shell $SHELL --system gitea @@ -78,7 +81,6 @@ wget --output-document $ACTRUNNER_BINARY.xz.sha256 https://gitea.com/gitea/act_r cat $ACTRUNNER_BINARY.xz.sha256 | sha256sum --check --status rm $ACTRUNNER_BINARY.xz.sha256 unxz $ACTRUNNER_BINARY.xz -rm $ACTRUNNER_BINARY.xz chmod 755 $ACTRUNNER_BINARY mv $ACTRUNNER_BINARY %{_sbindir}/act_runner @@ -100,6 +102,9 @@ systemctl reenable gitea.service systemctl restart gitea.service nginx.service %postun +# Display commands and exit on error +set -xe + # If uninstalling, then delete users and db if [ $1 == 0 ]; then # Remove gitea user if existing