[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1895 - GNUnet/contrib
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1895 - GNUnet/contrib |
Date: |
Wed, 24 Aug 2005 22:09:39 -0700 (PDT) |
Author: grothoff
Date: 2005-08-24 22:09:38 -0700 (Wed, 24 Aug 2005)
New Revision: 1895
Added:
GNUnet/contrib/init_gnunet_redhat
GNUnet/contrib/init_gnunet_ubuntu
Removed:
GNUnet/contrib/autoinstall
GNUnet/contrib/initgnunet
Log:
cleanup
Deleted: GNUnet/contrib/autoinstall
===================================================================
--- GNUnet/contrib/autoinstall 2005-08-25 03:47:59 UTC (rev 1894)
+++ GNUnet/contrib/autoinstall 2005-08-25 05:09:38 UTC (rev 1895)
@@ -1,48 +0,0 @@
-#!/bin/sh
-echo "This script compiles, installs and starts GNUnet."
-echo "It must be run as root (sorry)."
-echo "GNUnet will be installed to /usr/local/."
-echo "Configuration files are created in /etc/gnunetd.conf."
-echo "Users still have to run gnunet-setup to create their"
-echo "personal configuration file ($USER/gnunet.conf)."
-echo "An init-script will be placed under /etc/init.d/gnunetd"
-echo " "
-if test $USER != root
-then
- echo "Not root. Aborting."
- exit -1
-fi
-if test -f contrib/initgnunet
-then
- echo "Please press CTRL-C now to abort or RETURN to continue."
- read
-else
- echo "This script must be run from the GNUnet/ source directory."
- exit -1
-fi
-cp contrib/initgnunet /etc/init.d/gnunetd
-chmod +x /etc/init.d/gnunetd
-./configure --prefix=/usr/local
-make -s
-make -s install
-echo " "
-echo "Press RETURN to start the interactive setup tool."
-read
-/usr/local/bin/gnunet-setup -d || exit -1
-echo " "
-echo "Note that you can start GNUnet text-user interfaces"
-echo "with the commands "
-echo " "
-echo "$ /usr/local/bin/gnunet-search"
-echo "$ /usr/local/bin/gnunet-download"
-echo "$ /usr/local/bin/gnunet-insert"
-echo " "
-echo "You may want to edit your startup sequence to"
-echo "automatically start gnunetd whenever your system boots."
-echo " "
-echo "Visit http://gnunet.org/ for further information."
-echo " "
-echo "Press RETURN to run gnunet-update and then start gnunetd."
-read
-/usr/local/bin/gnunet-update
-/usr/local/bin/gnunetd
Copied: GNUnet/contrib/init_gnunet_redhat (from rev 1885,
GNUnet/contrib/initgnunet)
Added: GNUnet/contrib/init_gnunet_ubuntu
===================================================================
--- GNUnet/contrib/init_gnunet_ubuntu 2005-08-25 03:47:59 UTC (rev 1894)
+++ GNUnet/contrib/init_gnunet_ubuntu 2005-08-25 05:09:38 UTC (rev 1895)
@@ -0,0 +1,59 @@
+#!/bin/sh
+# Start/stop the GNUnet daemon.
+
+# ubuntu init.d script, required user gnunet, optional binaries installed to
/home/gnunet/bin
+
+# add path
+export PATH="$PATH:/home/gnunet/bin"
+
+# gnunetd options
+OPT="--user=gnunet"
+
+# test gnunet user access to binary
+su -p gnunet -- gnunetd --version 1>/dev/null 2>/dev/null
+test $? -eq 0 || exit 0
+
+
+. /lib/lsb/init-functions
+
+case "$1" in
+start) log_begin_msg "Starting GNUnet daemon..."
+ #start-stop-daemon --start --quiet --name gnunetd --startas "$EXEC" --
"$OPT"
+ su -p gnunet -- gnunetd "$OPT" 1>/dev/null 2>/dev/null
+ log_end_msg $?
+ ;;
+stop) log_begin_msg "Stopping GNUnet daemon..."
+ start-stop-daemon --user gnunet --stop --quiet --name gnunetd
+ log_end_msg $?
+ ;;
+restart) log_begin_msg "Restarting GNUnet daemon..."
+ start-stop-daemon --user gnunet --stop --retry 5 --quiet --name gnunetd
+ #start-stop-daemon --start --quiet --pidfile /var/run/gnunetd.pid
--name gnunetd --startas "$EXEC" -- "$OPT"
+ su -p gnunet -- gnunetd "$OPT" 1>/dev/null 2>/dev/null
+ log_end_msg $?
+ ;;
+status) log_begin_msg "GNUnet status..."
+ #start-stop-daemon --start --quiet --pidfile /var/run/gnunetd.pid
--name gnunetd --startas "$EXEC" -- "$OPT"
+ su -p gnunet -- gnunet-stats --version 1>/dev/null 2>/dev/null
+ if test $? -eq 0 ;then
+ su -p gnunet -- gnunet-stats
+ else
+ log_end_msg $?
+ fi;
+ ;;
+
+reload|force-reload) log_begin_msg "Reloading configuration files for GNUnet
daemon..."
+ # stop
+ start-stop-daemon --user gnunet --stop --quiet --name gnunetd
+ # sleep
+ sleep 5
+ # start
+ su -p gnunet -- gnunetd "$OPT" 1>/dev/null 2>/dev/null
+ # ...or hup if gnunetd supports
+ log_end_msg 0
+ ;;
+*) log_success_msg "Usage: /etc/init.d/gnunet
start|stop|restart|status|reload|force-reload"
+ exit 1
+ ;;
+esac
+exit 0
Deleted: GNUnet/contrib/initgnunet
===================================================================
--- GNUnet/contrib/initgnunet 2005-08-25 03:47:59 UTC (rev 1894)
+++ GNUnet/contrib/initgnunet 2005-08-25 05:09:38 UTC (rev 1895)
@@ -1,81 +0,0 @@
-#!/bin/sh
-#
-# GNUnet Start/Stop GNUnet server
-#
-# chkconfig: - 35 65
-# description: GNUnet is an anonymous distributed secure network
-# this server is required to connect to the network,
-# it will open a TCP port to communicate with the
-# GUI and an UDP port to communicate with the world.
-# The configuration file /etc/gnunetd.conf will be used.
-# processname: gnunetd
-# pidfile: /var/run/gnunetd.pid
-#
-# This script was initially written on/for RH/Zen. You may have
-# to adapt it.
-#
-# Source function library.
-. /etc/init.d/functions
-
-# Get config.
-. /etc/sysconfig/network
-
-# Just in case gnunetd is in /usr/local and not on the path
-export PATH=/usr/local/bin:$PATH
-
-# Check that networking is up.
-if [ ${NETWORKING} = "no" ]
-then
- exit 0
-fi
-
-[ -x `which gnunetd` ] || exit 0
-
-RETVAL=0
-prog="gnunetd"
-
-start() {
- echo -n $"Starting $prog: "
- daemon `which gnunetd` -u gnunet
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gnunetd
- return $RETVAL
-}
-
-stop() {
- echo -n $"Stopping $prog: "
- killproc gnunetd
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gnunetd
- return $RETVAL
-}
-
-# See how we were called.
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- status)
- status gnunetd
- ;;
- restart|reload)
- stop
- start
- ;;
- condrestart)
- if [ -f /var/lock/subsys/gnunetd ]; then
- stop
- start
- fi
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
- exit 1
-esac
-
-exit $RETVAL
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1895 - GNUnet/contrib,
grothoff <=