pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gnunet: rc.d script



Module Name:	pkgsrc-wip
Committed By:	ng0 <ng0%n0.is@localhost>
Pushed By:	ng0
Date:		Fri Mar 1 12:05:37 2019 +0000
Changeset:	522c64170e85c19d99dd58f736f5c0e18d723667

Modified Files:
	gnunet/files/gnunet.in

Log Message:
gnunet: rc.d script

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=522c64170e85c19d99dd58f736f5c0e18d723667

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gnunet/files/gnunet.in | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diffs:
diff --git a/gnunet/files/gnunet.in b/gnunet/files/gnunet.in
index 4d23799f30..73d2fd6632 100755
--- a/gnunet/files/gnunet.in
+++ b/gnunet/files/gnunet.in
@@ -23,13 +23,11 @@ pidfile="@PKG_HOME@/${name}.pid"
 : ${gnunet_home:=@PKG_HOME@}
 : ${gnunetdns_group:=@GNUNETDNS_GROUP@}
 
-extra_commands="reload"
 start_cmd="gnunet_start"
 start_precmd="gnunet_precmd"
 stop_cmd="gnunet_stop"
 restart_cmd="gnunet_stop ; gnunet_start"
 restart_precmd="gnunet_precmd"
-reload_cmd="gnunet_reload"
 
 gnunet_chdir="${gnunet_home}"
 gnunet_env="HOME=${gnunet_home}"
@@ -63,7 +61,7 @@ gnunet_stop()
 	@ECHO@ "Stopping ${name}."
 	doit="@SU@ -m ${gnunet_user} -c '${command} ${command_args} -e -c @PKG_SYSCONFDIR@/gnunet.conf'"
 	eval $doit
-	kill `cat ${pidfile}` 2>/dev/null
+	# kill `cat ${pidfile}` 2>/dev/null
 	sleep 1
 	rm -rf /tmp/gnunet-gnunet-runtime 2>/dev/null 2>&1
 	rm -rf /tmp/gnunet-system-runtime 2>/dev/null 2>&1
@@ -74,7 +72,8 @@ if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]
 	run_rc_command "$1"
 else
 	pidfile="${gnunet_home}/${name}.pid"
-	case "$1" in
+	cmd=${1:-start}
+	case ${cmd} in
 	restart)
 		eval ${restart_precmd}
 		eval ${restart_cmd}
@@ -84,12 +83,14 @@ else
 			eval ${stop_cmd}
 		fi
 		;;
-	reload)
-		eval ${reload_cmd}
-		;;
-	*)
+	start)
 		eval ${start_precmd}
 		eval ${start_cmd}
 		;;
+	*)
+		echo 1>&2 "Usage: $0 [start|stop|restart]"
+		exit 1
+		;;
 	esac
+	exit 0
 fi


Home | Main Index | Thread Index | Old Index