mirror of
https://abf.rosa.ru/djam/gnunet.git
synced 2025-02-23 18:12:55 +00:00
Automatic import for version 0.9.0
This commit is contained in:
commit
a6cd19d96f
7 changed files with 505 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
sources:
|
||||
"gnunet-0.9.0pre2.tar.gz": 78877347e41d055e8b766b48ed4f0033d1a102b2
|
21
gnunet-0.9.0-build-fix.patch
Normal file
21
gnunet-0.9.0-build-fix.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
diff -wbBur gnunet-0.9.0pre2/src/transport/plugin_transport_http.c gnunet-0.9.0pre2.my/src/transport/plugin_transport_http.c
|
||||
--- gnunet-0.9.0pre2/src/transport/plugin_transport_http.c 2010-12-23 09:37:50.000000000 +0000
|
||||
+++ gnunet-0.9.0pre2.my/src/transport/plugin_transport_http.c 2011-03-24 07:59:13.000000000 +0000
|
||||
@@ -1077,7 +1077,7 @@
|
||||
|
||||
conn_info = MHD_get_connection_info(mhd_connection, MHD_CONNECTION_INFO_CLIENT_ADDRESS );
|
||||
/* Incoming IPv4 connection */
|
||||
- if ( AF_INET == conn_info->client_addr->sin_family)
|
||||
+ if ( AF_INET == ((struct sockaddr_in*)(conn_info->client_addr))->sin_family)
|
||||
{
|
||||
addrin = conn_info->client_addr;
|
||||
inet_ntop(addrin->sin_family, &(addrin->sin_addr),address,INET_ADDRSTRLEN);
|
||||
@@ -1087,7 +1087,7 @@
|
||||
addr_len = sizeof(struct IPv4HttpAddress);
|
||||
}
|
||||
/* Incoming IPv6 connection */
|
||||
- if ( AF_INET6 == conn_info->client_addr->sin_family)
|
||||
+ if ( AF_INET6 == ((struct sockaddr_in6*)(conn_info->client_addr))->sin6_family)
|
||||
{
|
||||
addrin6 = (struct sockaddr_in6 *) conn_info->client_addr;
|
||||
inet_ntop(addrin6->sin6_family, &(addrin6->sin6_addr),address,INET6_ADDRSTRLEN);
|
13
gnunet-0.9.0pre2-conf.patch
Normal file
13
gnunet-0.9.0pre2-conf.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff -urN gnunet-0.9.0pre2/contrib/defaults.conf gnunet-0.9.0pre2-patched/contrib/defaults.conf
|
||||
--- gnunet-0.9.0pre2/contrib/defaults.conf 2010-12-19 17:17:27.000000000 +0300
|
||||
+++ gnunet-0.9.0pre2-patched/contrib/defaults.conf 2011-08-10 19:38:11.972776814 +0400
|
||||
@@ -1,7 +1,6 @@
|
||||
[PATHS]
|
||||
-SERVICEHOME = ~/.gnunet/
|
||||
-# SERVICEHOME = /var/lib/gnunet/
|
||||
-# DEFAULTCONFIG = /etc/gnunet.conf
|
||||
+SERVICEHOME = /var/lib/gnunet/
|
||||
+DEFAULTCONFIG = /etc/gnunet.conf
|
||||
# If 'DEFAULTCONFIG' is not defined, the current
|
||||
# configuration file is assumed to be the default,
|
||||
# which is what we want by default...
|
90
gnunet-0.9.0pre2-link.patch
Normal file
90
gnunet-0.9.0pre2-link.patch
Normal file
|
@ -0,0 +1,90 @@
|
|||
diff -urN gnunet-0.9.0pre2/src/dv/Makefile.am gnunet-0.9.0pre2-patched/src/dv/Makefile.am
|
||||
--- gnunet-0.9.0pre2/src/dv/Makefile.am 2010-12-20 00:17:27.000000000 +1000
|
||||
+++ gnunet-0.9.0pre2-patched/src/dv/Makefile.am 2011-08-11 22:38:18.619126573 +1100
|
||||
@@ -36,6 +36,7 @@
|
||||
$(top_builddir)/src/dv/libgnunetdv.la \
|
||||
$(top_builddir)/src/hello/libgnunethello.la \
|
||||
$(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
|
||||
+ $(top_builddir)/src/core/libgnunetcore.la \
|
||||
$(top_builddir)/src/util/libgnunetutil.la \
|
||||
$(GN_LIBINTL)
|
||||
gnunet_service_dv_DEPENDENCIES = \
|
||||
diff -urN gnunet-0.9.0pre2/src/dv/Makefile.in gnunet-0.9.0pre2-patched/src/dv/Makefile.in
|
||||
--- gnunet-0.9.0pre2/src/dv/Makefile.in 2010-12-20 04:22:15.000000000 +1000
|
||||
+++ gnunet-0.9.0pre2-patched/src/dv/Makefile.in 2011-08-11 22:38:18.620127073 +1100
|
||||
@@ -111,6 +111,7 @@
|
||||
test_transport_api_dv_DEPENDENCIES = \
|
||||
$(top_builddir)/src/transport/libgnunettransport.la \
|
||||
$(top_builddir)/src/util/libgnunetutil.la \
|
||||
+ $(top_builddir)/src/core/libgnunetcore.la \
|
||||
$(top_builddir)/src/testing/libgnunettesting.la
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
@@ -372,6 +373,7 @@
|
||||
$(top_builddir)/src/dv/libgnunetdv.la \
|
||||
$(top_builddir)/src/hello/libgnunethello.la \
|
||||
$(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
|
||||
+ $(top_builddir)/src/core/libgnunetcore.la \
|
||||
$(top_builddir)/src/util/libgnunetutil.la \
|
||||
$(GN_LIBINTL)
|
||||
|
||||
diff -urN gnunet-0.9.0pre2/src/peerinfo-tool/Makefile.am gnunet-0.9.0pre2-patched/src/peerinfo-tool/Makefile.am
|
||||
--- gnunet-0.9.0pre2/src/peerinfo-tool/Makefile.am 2010-07-29 05:53:05.000000000 +1100
|
||||
+++ gnunet-0.9.0pre2-patched/src/peerinfo-tool/Makefile.am 2011-08-11 22:39:02.262935174 +1100
|
||||
@@ -17,6 +17,7 @@
|
||||
gnunet_peerinfo_LDADD = \
|
||||
$(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
|
||||
$(top_builddir)/src/transport/libgnunettransport.la \
|
||||
+ $(top_builddir)/src/hello/libgnunethello.la \
|
||||
$(top_builddir)/src/util/libgnunetutil.la
|
||||
|
||||
if HAVE_PYTHON_PEXPECT
|
||||
diff -urN gnunet-0.9.0pre2/src/peerinfo-tool/Makefile.in gnunet-0.9.0pre2-patched/src/peerinfo-tool/Makefile.in
|
||||
--- gnunet-0.9.0pre2/src/peerinfo-tool/Makefile.in 2010-11-10 06:27:52.000000000 +1000
|
||||
+++ gnunet-0.9.0pre2-patched/src/peerinfo-tool/Makefile.in 2011-08-11 22:39:47.868723596 +1100
|
||||
@@ -62,6 +62,7 @@
|
||||
gnunet_peerinfo_DEPENDENCIES = \
|
||||
$(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
|
||||
$(top_builddir)/src/transport/libgnunettransport.la \
|
||||
+ $(top_builddir)/src/hello/libgnunethello.la \
|
||||
$(top_builddir)/src/util/libgnunetutil.la
|
||||
AM_V_lt = $(am__v_lt_$(V))
|
||||
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
|
||||
@@ -305,6 +306,7 @@
|
||||
gnunet_peerinfo_LDADD = \
|
||||
$(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
|
||||
$(top_builddir)/src/transport/libgnunettransport.la \
|
||||
+ $(top_builddir)/src/hello/libgnunethello.la \
|
||||
$(top_builddir)/src/util/libgnunetutil.la
|
||||
|
||||
@HAVE_PYTHON_PEXPECT_TRUE@check_SCRIPTS = \
|
||||
diff -urN gnunet-0.9.0pre2/src/testing/Makefile.am gnunet-0.9.0pre2-patched/src/testing/Makefile.am
|
||||
--- gnunet-0.9.0pre2/src/testing/Makefile.am 2010-12-21 07:45:58.000000000 +1000
|
||||
+++ gnunet-0.9.0pre2-patched/src/testing/Makefile.am 2011-08-11 22:38:18.620127073 +1100
|
||||
@@ -18,6 +18,7 @@
|
||||
$(top_builddir)/src/core/libgnunetcore.la \
|
||||
$(top_builddir)/src/statistics/libgnunetstatistics.la \
|
||||
$(top_builddir)/src/transport/libgnunettransport.la \
|
||||
+ $(top_builddir)/src/hello/libgnunethello.la \
|
||||
-lm \
|
||||
$(top_builddir)/src/util/libgnunetutil.la
|
||||
|
||||
diff -urN gnunet-0.9.0pre2/src/testing/Makefile.in gnunet-0.9.0pre2-patched/src/testing/Makefile.in
|
||||
--- gnunet-0.9.0pre2/src/testing/Makefile.in 2010-12-21 07:51:21.000000000 +1000
|
||||
+++ gnunet-0.9.0pre2-patched/src/testing/Makefile.in 2011-08-11 22:38:18.622128072 +1100
|
||||
@@ -106,6 +106,7 @@
|
||||
$(top_builddir)/src/core/libgnunetcore.la \
|
||||
$(top_builddir)/src/statistics/libgnunetstatistics.la \
|
||||
$(top_builddir)/src/transport/libgnunettransport.la \
|
||||
+ $(top_builddir)/src/hello/libgnunethello.la \
|
||||
$(top_builddir)/src/util/libgnunetutil.la
|
||||
am_libgnunettesting_la_OBJECTS = testing.lo testing_group.lo
|
||||
libgnunettesting_la_OBJECTS = $(am_libgnunettesting_la_OBJECTS)
|
||||
@@ -531,6 +532,7 @@
|
||||
$(top_builddir)/src/core/libgnunetcore.la \
|
||||
$(top_builddir)/src/statistics/libgnunetstatistics.la \
|
||||
$(top_builddir)/src/transport/libgnunettransport.la \
|
||||
+ $(top_builddir)/src/hello/libgnunethello.la \
|
||||
-lm \
|
||||
$(top_builddir)/src/util/libgnunetutil.la
|
||||
|
171
gnunet.spec
Normal file
171
gnunet.spec
Normal file
|
@ -0,0 +1,171 @@
|
|||
%define name gnunet
|
||||
|
||||
%define gnunetuser gnunetd
|
||||
%define gnunethome /var/lib/gnunet
|
||||
|
||||
%define major 0
|
||||
%define util_major 4
|
||||
%define libname %mklibname %{name} %{major}
|
||||
%define libutilname %mklibname %{name}util %{util_major}
|
||||
%define devname %mklibname -d %{name}
|
||||
|
||||
%define pre pre2
|
||||
|
||||
Name: %{name}
|
||||
Version: 0.9.0
|
||||
Release: %mkrel 0.%{pre}.1
|
||||
License: GPLv2+
|
||||
Summary: Secure and anonymous peer-to-peer file sharing
|
||||
URL: http://gnunet.org/
|
||||
Source0: http://gnunet.org/download/%{name}-%{version}%{pre}.tar.gz
|
||||
Source1: gnunetd.conf
|
||||
Source2: init_gnunetd
|
||||
Patch0: gnunet-0.9.0-build-fix.patch
|
||||
Patch1: gnunet-0.9.0pre2-link.patch
|
||||
Patch2: gnunet-0.9.0pre2-conf.patch
|
||||
Group: Networking/File transfer
|
||||
BuildRequires: libextractor-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: curl-devel
|
||||
BuildRequires: libgcrypt-devel
|
||||
BuildRequires: gawk
|
||||
BuildRequires: libgmp-devel
|
||||
BuildRequires: libgtk+2.0-devel
|
||||
BuildRequires: libglade2.0-devel
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: sqlite3-devel
|
||||
BuildRequires: mysql-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: libmicrohttpd-devel
|
||||
BuildRequires: libncursesw-devel
|
||||
BuildRequires: libltdl-devel
|
||||
Suggests: mysql-client
|
||||
Requires: %{libname} = %{version}-%{release}
|
||||
|
||||
%description
|
||||
GNUnet is a framework for secure peer-to-peer networking that does not
|
||||
use any centralized or otherwise trusted services. A first service
|
||||
implemented on top of the networking layer allows anonymous censorship-
|
||||
resistant file-sharing. GNUnet uses a simple, excess-based economic
|
||||
model to allocate resources. Peers in GNUnet monitor each others behavior
|
||||
with respect to resource usage; peers that contribute to the network
|
||||
are rewarded with better service.
|
||||
|
||||
%package -n %libname
|
||||
Summary: Libraries for GNUnet
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %libname
|
||||
Libraries for GNUnet.
|
||||
|
||||
%package -n %libutilname
|
||||
Summary: Library for GNUnet
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %libutilname
|
||||
Library for GNUnet.
|
||||
|
||||
%package -n %devname
|
||||
Summary: Development files for %{libname}
|
||||
Group: Development/C
|
||||
Provides: %{name}-devel = %{version}-%{release}
|
||||
Requires: %{libname} = %{version}-%{release}
|
||||
Requires: %{libutilname} = %{version}-%{release}
|
||||
|
||||
%description -n %devname
|
||||
Development files for %{libname}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{pre}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
autoreconf
|
||||
%configure2_5x
|
||||
# makefile doesn't support running multiple jobs simultaneously
|
||||
%{__make}
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
%makeinstall_std
|
||||
%{__mkdir_p} %{buildroot}%{gnunethome}
|
||||
%{__mkdir_p} %{buildroot}%{_sysconfdir}
|
||||
#{__install} -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}d.conf
|
||||
%{__mkdir_p} %{buildroot}%{_initrddir}
|
||||
%{__install} -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name}d
|
||||
%{__ln_s} %{_datadir}/%{name}/defaults.conf %{buildroot}%{_sysconfdir}/gnunet.conf
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%pre
|
||||
%_pre_useradd %{gnunetuser} %{gnunethome} /bin/false
|
||||
|
||||
%post
|
||||
%_post_service %{name}d
|
||||
|
||||
%preun
|
||||
%_preun_service %{name}d
|
||||
|
||||
%postun
|
||||
%_postun_userdel %gnunetuser
|
||||
|
||||
%if %mdkversion < 200900
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%files -f %{name}.lang
|
||||
%doc AUTHORS ChangeLog NEWS README
|
||||
%attr(0700, %{gnunetuser}, %{gnunetuser}) %dir %{gnunethome}
|
||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||
%config %{_initrddir}/%{name}d
|
||||
%{_bindir}/*
|
||||
%{_libdir}/%{name}
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/*
|
||||
|
||||
%files -n %libname
|
||||
%{_libdir}/lib%{name}*.so.%{major}*
|
||||
|
||||
%files -n %libutilname
|
||||
%{_libdir}/lib%{name}util.so.%{util_major}*
|
||||
|
||||
%files -n %devname
|
||||
%{_libdir}/lib%{name}*.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_libdir}/lib%{name}*.la
|
||||
%dir %{_includedir}/%{name}
|
||||
%{_includedir}/%{name}/*
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Aug 11 2011 Andrey Bondrov <abondrov@mandriva.org> 0.9.0-0.pre2.1
|
||||
+ Revision: 693952
|
||||
- Update patch1
|
||||
- imported package gnunet
|
||||
|
||||
|
||||
* Thu Aug 11 2011 Andrey Bondrov <bondrov@math.dvgu.ru> 0.9.0-0.pre2.1mdv2011.0
|
||||
- Port to 2011
|
||||
- New version
|
||||
- Major spec rewrite
|
||||
|
||||
* Wed Apr 02 2008 Anssi Hannula <anssi@zarb.org> 0.7.3-1plf2008.1
|
||||
- add to PLF
|
||||
- ensure major correctness
|
||||
- do not package COPYING, it is GPLv2+
|
||||
- provide gnunet-devel
|
||||
- fix library groups
|
||||
- split library package due to different majors
|
||||
- fix plugin loading on lib64 systems
|
||||
- do not use daemonize
|
||||
|
||||
* Fri Mar 21 2008 Nicolas Vigier <boklm@mars-attacks.org> 0.7.3-1mdv2008.1
|
||||
- first version
|
125
gnunetd.conf
Normal file
125
gnunetd.conf
Normal file
|
@ -0,0 +1,125 @@
|
|||
[Meta]
|
||||
ADVANCED = YES
|
||||
RARE = YES
|
||||
EXPERIMENTAL = NO
|
||||
|
||||
[PATHS]
|
||||
GNUNETD_HOME = /var/lib/gnunet
|
||||
|
||||
[GNUNETD]
|
||||
APPLICATIONS = advertising getoption fs stats traffic
|
||||
TRANSPORTS = udp tcp http nat
|
||||
HOSTLISTURL = http://gnunet.org/hostlist.php http://gnunet.mine.nu:8081/hostlist http://de.gnunet.org/cgi-bin/hostlist.cgi
|
||||
HOSTS = /var/lib/gnunet/data/hosts/
|
||||
HTTP-PROXY =
|
||||
FDLIMIT = 1024
|
||||
USER = gnunetd
|
||||
GROUP = gnunetd
|
||||
PIDFILE = /var/run/gnunetd/pid
|
||||
AUTOSTART = YES
|
||||
HELLOEXPIRES = 1440
|
||||
PRIVATE-NETWORK = NO
|
||||
LIMIT-ALLOW =
|
||||
LIMIT-DENY =
|
||||
KEEPLOG = 3
|
||||
LOGFILE = $GNUNETD_HOME/daemon-logs
|
||||
|
||||
[MODULES]
|
||||
sqstore = sqstore_sqlite
|
||||
dstore = dstore_sqlite
|
||||
topology = topology_default
|
||||
|
||||
[NETWORK]
|
||||
PORT = 2087
|
||||
TRUSTED = 127.0.0.0/8;
|
||||
DISABLE-ADVERTISEMENTS = NO
|
||||
HELLOEXCHANGE = YES
|
||||
DISABLE-AUTOCONNECT = NO
|
||||
INTERFACE = eth0
|
||||
IP =
|
||||
|
||||
[F2F]
|
||||
FRIENDS-ONLY = NO
|
||||
MINIMUM = 0
|
||||
FRIENDS = $GNUNETD_HOME/friends
|
||||
|
||||
[FS]
|
||||
DIR = $GNUNETD_HOME/data/fs
|
||||
INDEX-DIRECTORY = $GNUNETD_HOME/data/shared
|
||||
QUOTA = 1024
|
||||
ACTIVEMIGRATION = NO
|
||||
|
||||
[TCPSERVER]
|
||||
DISABLE = NO
|
||||
|
||||
[LOGGING]
|
||||
DEVELOPER = NO
|
||||
USER-LEVEL = WARNING
|
||||
ADMIN-LEVEL = WARNING
|
||||
|
||||
[LOAD]
|
||||
MAXNETDOWNBPSTOTAL = 50000
|
||||
MAXNETUPBPSTOTAL = 50000
|
||||
HARDUPLIMIT = 0
|
||||
MAXCPULOAD = 100
|
||||
MAXIOLOAD = 50
|
||||
HARDCPULIMIT = 0
|
||||
BASICLIMITING = YES
|
||||
INTERFACES = eth0
|
||||
|
||||
[GNUNETD-EXPERIMENTAL]
|
||||
PADDING = NO
|
||||
|
||||
[NAT]
|
||||
LIMITED = AUTO
|
||||
|
||||
[TCP]
|
||||
PORT = 2086
|
||||
UPNP = YES
|
||||
BLACKLIST =
|
||||
WHITELIST =
|
||||
|
||||
[TCP6]
|
||||
PORT = 2088
|
||||
BLACKLIST =
|
||||
WHITELIST =
|
||||
|
||||
[UDP]
|
||||
PORT = 2086
|
||||
UPNP = YES
|
||||
MTU = 1472
|
||||
BLACKLIST =
|
||||
WHITELIST =
|
||||
|
||||
[UDP6]
|
||||
PORT = 2088
|
||||
MTU = 1452
|
||||
BLACKLIST =
|
||||
WHITELIST =
|
||||
|
||||
[HTTP]
|
||||
PORT = 1080
|
||||
ADVERTISED-PORT = 80
|
||||
UPNP = YES
|
||||
|
||||
[SMTP]
|
||||
EMAIL = gnunet@localhost
|
||||
RATELIMIT = 0
|
||||
FILTER = X-mailer: GNUnet
|
||||
PIPE = /var/lib/gnunet/smtp-pipe
|
||||
SERVER = localhost:25
|
||||
MTU = 65528
|
||||
|
||||
[GAP]
|
||||
TABLESIZE = 65536
|
||||
|
||||
[DHT]
|
||||
TABLESIZE = 1024
|
||||
|
||||
[DSTORE]
|
||||
QUOTA = 1
|
||||
|
||||
[MYSQL]
|
||||
CONFIG = /etc/my.cnf
|
||||
DATABASE = gnunet
|
||||
|
83
init_gnunetd
Executable file
83
init_gnunetd
Executable file
|
@ -0,0 +1,83 @@
|
|||
#!/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.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
# Get config.
|
||||
. /etc/sysconfig/network
|
||||
|
||||
# Just in case gnunetd is in /usr/local and not on the path
|
||||
GNUNETD=/usr/bin/gnunet-arm
|
||||
|
||||
# Check that networking is up.
|
||||
if [ ${NETWORKING} = "no" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
RETVAL=0
|
||||
prog="gnunet-arm"
|
||||
|
||||
start() {
|
||||
gprintf "Starting %s: " "$prog"
|
||||
daemon --user gnunetd $GNUNETD -s -c /etc/gnunet.conf
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/gnunetd
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
show_status() {
|
||||
status gnunetd
|
||||
}
|
||||
|
||||
stop() {
|
||||
gprintf "Stopping %s: " "$prog"
|
||||
killproc gnunet-arm
|
||||
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)
|
||||
show_status
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
condrestart)
|
||||
if [ -f /var/lock/subsys/gnunetd ]; then
|
||||
stop
|
||||
start
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
gprintf "Usage: %s {start|stop|status|restart|reload|condrestart}\n" "$0"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
Loading…
Add table
Reference in a new issue