Wed Mar 23 23:41:14 2022 UTC ()
gitea: minor fix to the RC script

This sets the working directory to / before issuing commands to Gitea.
Fix from the pgsql script; it addresses the following issue when
managing Gitea:

  # /etc/rc.d/gitea restart
  Stopping gitea.
  sh: Cannot determine current working directory
  Starting gitea.
  sh: Cannot determine current working directory

(and then Gitea not starting again)

Bumps PKGREVISION.

During freeze, but leaf package AFAICT.

Tested on NetBSD/amd64.


(khorben)
diff -r1.67 -r1.68 pkgsrc/www/gitea/Makefile
diff -r1.4 -r1.5 pkgsrc/www/gitea/files/gitea.sh

cvs diff -r1.67 -r1.68 pkgsrc/www/gitea/Makefile (expand / switch to context diff)
--- pkgsrc/www/gitea/Makefile 2022/03/07 09:14:13 1.67
+++ pkgsrc/www/gitea/Makefile 2022/03/23 23:41:14 1.68
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.67 2022/03/07 09:14:13 bsiegert Exp $
+# $NetBSD: Makefile,v 1.68 2022/03/23 23:41:14 khorben Exp $
 
 DISTNAME=	gitea-1.16.1
 MASTER_SITES=	${MASTER_SITE_GITHUB:=go-gitea/}
-PKGREVISION=	1
+PKGREVISION=	2
 CATEGORIES=	www
 GITHUB_TAG=	v${PKGVERSION_NOREV}
 

cvs diff -r1.4 -r1.5 pkgsrc/www/gitea/files/gitea.sh (expand / switch to context diff)
--- pkgsrc/www/gitea/files/gitea.sh 2021/11/18 02:45:29 1.4
+++ pkgsrc/www/gitea/files/gitea.sh 2022/03/23 23:41:14 1.5
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: gitea.sh,v 1.4 2021/11/18 02:45:29 khorben Exp $
+# $NetBSD: gitea.sh,v 1.5 2022/03/23 23:41:14 khorben Exp $
 #
 # PROVIDE: gitea
 # REQUIRE: DAEMON
@@ -24,6 +24,8 @@
 
 gitea_user="@GITEA_USER@"
 gitea_group="@GITEA_GROUP@"
+
+cd /
 
 load_rc_config $name
 run_rc_command "$1"