debian/0000755000000000000000000000000012241132661007164 5ustar debian/globus-gridftp-server-progs.manpages0000644000000000000000000000011511747263123016272 0ustar debian/globus-gridftp-password.8 debian/globus-gridftp-server-setup-chroot.8 debian/globus-gridftp-password.80000644000000000000000000000204211736733304014054 0ustar .TH GLOBUS-GRIDFTP-PASSWORD 8 "February 16th, 2012" "" "Globus Toolkit" .SH "NAME" globus-gridftp-password - creates an encrypted password to be used for an user of the Globus GridFTP server .SH "SYNOPSYS" .B "globus-gridftp-password" .SH "DESCRIPTION" Create encrypted user passwords to be used with the GridFTP server in case it is configured to use clear text password. However, this type of functionality is not recommended, unless the network is trusted. The \fBglobus-gridftp-password\fR command asks for a password and generates a line in the same format as the standard password file (see file \fB/etc/passwd\fR). Such a line can be appended to the password file used by the GridFTP server. .SH "EXAMPLE" .nf .B % gridftp-password.pl >> pwfile .B " Password:" .fi Generates a password line for the current user and append it to file "pwfile". .SH AUTHOR Initiative for Globus in Europe (IGE), http://www.ige-project.eu .SH COPYRIGHT Copyright \(co 2012 Initiative for Globus in Europe (IGE) .SH "SEE ALSO" globus-gridftp-server(8) debian/control0000644000000000000000000001063612240644750010603 0ustar Source: globus-gridftp-server Priority: optional Maintainer: Mattias Ellert Build-Depends: debhelper (>= 5), autotools-dev, grid-packaging-tools (>= 3.4), globus-core (>= 8.16), libglobus-common-dev (>= 14.10), libglobus-xio-dev (>= 3.6), libglobus-gridftp-server-control-dev (>= 2.10), libglobus-gfork-dev (>= 3.2-3~), libglobus-xio-gsi-driver-dev (>= 2.4), libglobus-gss-assist-dev (>= 9), libglobus-ftp-control-dev (>= 4.7), libglobus-authz-dev (>= 2.2-3~), libglobus-gsi-credential-dev (>= 6), libglobus-usage-dev (>= 3.1-4~), libssl-dev Standards-Version: 3.9.4 Section: net Vcs-Browser: http://svn.nordugrid.org/trac/packaging/browser/debian/globus-gridftp-server Vcs-Svn: http://svn.nordugrid.org/repos/packaging/debian/globus-gridftp-server Homepage: http://www.globus.org/ Package: libglobus-gridftp-server6 Section: libs Architecture: any Multi-Arch: same Replaces: libglobus-gridftp-server0 Conflicts: libglobus-gridftp-server0 Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends}, libglobus-xio-gsi-driver0 (>= 2) Description: Globus Toolkit - Globus GridFTP Server The Globus Toolkit is an open source software toolkit used for building Grid systems and applications. It is being developed by the Globus Alliance and many others all over the world. A growing number of projects and companies are using the Globus Toolkit to unlock the potential of grids for their cause. . The libglobus-gridftp-server6 package contains: Globus GridFTP Server Package: globus-gridftp-server-progs Section: net Architecture: any Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends}, libglobus-xio-gsi-driver0 (>= 2) Description: Globus Toolkit - Globus GridFTP Server Programs The Globus Toolkit is an open source software toolkit used for building Grid systems and applications. It is being developed by the Globus Alliance and many others all over the world. A growing number of projects and companies are using the Globus Toolkit to unlock the potential of grids for their cause. . The globus-gridftp-server-progs package contains: Globus GridFTP Server Programs Package: libglobus-gridftp-server-dev Section: libdevel Architecture: any Multi-Arch: same Depends: libglobus-gridftp-server6 (= ${binary:Version}), ${misc:Depends}, libglobus-common-dev (>= 14), libglobus-xio-dev (>= 3), libglobus-gridftp-server-control-dev (>= 2), libglobus-gfork-dev (>= 3), libglobus-xio-gsi-driver-dev (>= 2), libglobus-gss-assist-dev (>= 9), libglobus-ftp-control-dev (>= 4), libglobus-authz-dev (>= 2), libglobus-gsi-credential-dev (>= 6), libglobus-usage-dev (>= 3), libssl-dev Description: Globus Toolkit - Globus GridFTP Server Development Files The Globus Toolkit is an open source software toolkit used for building Grid systems and applications. It is being developed by the Globus Alliance and many others all over the world. A growing number of projects and companies are using the Globus Toolkit to unlock the potential of grids for their cause. . The libglobus-gridftp-server-dev package contains: Globus GridFTP Server Development Files Package: libglobus-gridftp-server-dbg Section: debug Priority: extra Architecture: any Multi-Arch: same Replaces: globus-gridftp-server-dbg (<< 6.38) Breaks: globus-gridftp-server-dbg (<< 6.38) Depends: libglobus-gridftp-server6 (= ${binary:Version}), ${misc:Depends} Description: Globus Toolkit - Globus GridFTP Server Debug Symbols The Globus Toolkit is an open source software toolkit used for building Grid systems and applications. It is being developed by the Globus Alliance and many others all over the world. A growing number of projects and companies are using the Globus Toolkit to unlock the potential of grids for their cause. . The libglobus-gridftp-server-dbg package contains: Globus GridFTP Server Debug Symbols Package: globus-gridftp-server-dbg Section: debug Priority: extra Architecture: any Multi-Arch: foreign Depends: globus-gridftp-server-progs (= ${binary:Version}), ${misc:Depends} Description: Globus Toolkit - Globus GridFTP Server Debug Symbols The Globus Toolkit is an open source software toolkit used for building Grid systems and applications. It is being developed by the Globus Alliance and many others all over the world. A growing number of projects and companies are using the Globus Toolkit to unlock the potential of grids for their cause. . The globus-gridftp-server-dbg package contains: Globus GridFTP Server Debug Symbols debian/rules0000755000000000000000000001062112240132767010252 0ustar #!/usr/bin/make -f # -*- makefile -*- name = globus-gridftp-server _name = globus_gridftp_server soname = 6 INSTALLDIR = $(CURDIR)/debian/tmp GLOBUSPACKAGEDIR = $(INSTALLDIR)$(_datadir)/globus/packages _prefix = /usr _bindir = $(_prefix)/bin _sbindir = $(_prefix)/sbin _libdir = $(_prefix)/lib/$(DEB_HOST_MULTIARCH) _datadir = $(_prefix)/share _mandir = $(_datadir)/man _docdir = $(_datadir)/doc/lib$(name)-dev DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) ifeq ($(DEB_HOST_ARCH_BITS), 64) flavor = gcc64-$(DEB_HOST_MULTIARCH) else flavor = gcc32-$(DEB_HOST_MULTIARCH) endif configure: configure-stamp configure-stamp: dh_testdir dh_autotools-dev_updateconfig /usr/share/globus/globus-bootstrap.sh GRIDMAP=/etc/grid-security/grid-mapfile ./configure \ --disable-static \ --with-flavor=$(flavor) \ --with-docdir=$(_docdir) # Reduce overlinking sed 's!CC -shared !CC \\$${wl}--as-needed -shared !g' -i libtool touch $@ build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp: configure-stamp dh_testdir $(MAKE) touch $@ clean: dh_testdir dh_testroot if [ -r Makefile ] ; then $(MAKE) distclean ; fi dh_autotools-dev_restoreconfig # Remove autogenerated files rm -f aclocal.m4 rm -f compile rm -f configure rm -f install-sh rm -f ltmain.sh rm -f missing rm -f mkinstalldirs rm -f doxygen/Doxyfile* rm -f doxygen/Makefile.am rm -f pkgdata/Makefile.am rm -f pkgdata/*.filelist rm -f pkgdata/*.gpt rm -f pkgdata/$(name).pc rm -f pkgdata/pkg_data_src.pc.in rm -f gptdata.sh rm -f globus_automake* rm -rf autom4te.cache rm -f config.h.in rm -f embed/Makefile find . -name Makefile.in -exec rm {} ';' rm -f build-stamp configure-stamp dh_clean debian/*.install install: build-stamp dh_testdir dh_testroot dh_prep $(MAKE) install DESTDIR=$(INSTALLDIR) # Remove libtool archives (.la files) find $(INSTALLDIR)$(_libdir) -name 'lib*.la' -exec rm -v '{}' \; sed '/lib.*\.la$$/d' \ -i $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_dev.filelist mv $(INSTALLDIR)/etc/gridftp.conf.default \ $(INSTALLDIR)/etc/gridftp.conf mkdir -p $(INSTALLDIR)/etc/xinetd.d mv $(INSTALLDIR)/etc/gridftp.xinetd.default \ $(INSTALLDIR)/etc/xinetd.d/gridftp mv $(INSTALLDIR)/etc/gridftp.gfork.default \ $(INSTALLDIR)/etc/gridftp.gfork rm $(GLOBUSPACKAGEDIR)/$(_name)/pkg_data_noflavor_data.gpt rm $(GLOBUSPACKAGEDIR)/$(_name)/noflavor_data.filelist # No need for environment in gfork scripts sed '/ env /d' -i $(INSTALLDIR)/etc/gridftp.gfork sed '/^env /d' -i $(INSTALLDIR)/etc/xinetd.d/gridftp # Remove start-up scripts rm -rf $(INSTALLDIR)/etc/init.d sed '/init\.d/d' -i $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_pgm.filelist # Move server man pages to progs package grep '.[18]$$' $(GLOBUSPACKAGEDIR)/$(_name)/noflavor_doc.filelist \ >> $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_pgm.filelist sed '/.[18]$$/d' -i $(GLOBUSPACKAGEDIR)/$(_name)/noflavor_doc.filelist # Remove installed license file rm -f $(INSTALLDIR)$(_docdir)/GLOBUS_LICENSE sed /GLOBUS_LICENSE/d \ -i $(GLOBUSPACKAGEDIR)/$(_name)/noflavor_doc.filelist # Generate package filelists cat $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_rtl.filelist \ $(GLOBUSPACKAGEDIR)/$(_name)/noflavor_doc.filelist \ | sed s!^!debian/tmp$(_prefix)! > debian/lib$(name)$(soname).install cat $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_pgm.filelist \ | sed s!^!debian/tmp$(_prefix)! > debian/$(name)-progs.install cat $(GLOBUSPACKAGEDIR)/$(_name)/$(flavor)_dev.filelist \ | sed s!^!debian/tmp$(_prefix)! > debian/lib$(name)-dev.install echo debian/tmp/etc/gridftp.conf >> debian/$(name)-progs.install echo debian/tmp/etc/gridftp.gfork >> debian/$(name)-progs.install echo debian/tmp/etc/xinetd.d/gridftp >> debian/$(name)-progs.install binary: binary-arch binary-indep binary-arch: install dh_testdir dh_testroot dh_installdocs debian/README dh_installchangelogs dh_install --fail-missing dh_installman dh_installinit --name globus-gridftp-server dh_installinit --name globus-gridftp-sshftp dh_link dh_strip -X/bin/ -X/sbin/ --dbg-package=lib$(name)-dbg dh_strip -X/lib/ --dbg-package=$(name)-dbg dh_compress dh_fixperms dh_perl dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary-indep: .PHONY: binary binary-arch binary-indep build build-arch build-indep clean configure install debian/README0000644000000000000000000000147311705715432010060 0ustar This package is part of the GridFTP component of the Globus Toolkit. For more information visit: http://www.globus.org/toolkit/docs/latest-stable/gridftp/ Admin Guide: http://www.globus.org/toolkit/docs/latest-stable/gridftp/admin/ User's Guide: http://www.globus.org/toolkit/docs/latest-stable/gridftp/user/ Developer's Guide: http://www.globus.org/toolkit/docs/latest-stable/gridftp/developer/ Release Notes: http://www.globus.org/toolkit/docs/latest-stable/gridftp/rn/ Public Interface Guide: http://www.globus.org/toolkit/docs/latest-stable/gridftp/pi/ Quality Profile: http://www.globus.org/toolkit/docs/latest-stable/gridftp/qp/ Migrating Guide: http://www.globus.org/toolkit/docs/latest-stable/gridftp/mig/ Globus debian packaging is supported by the Initiative for Globus in Europe: http://www.ige-project.eu/ debian/globus-gridftp-server-setup-chroot.80000644000000000000000000000266411736733331016164 0ustar .TH GLOBUS-GRIDFTP-SERVER-SETUP-CHROOT 8 "February 16th, 2012" "" "Globus Toolkit" .SH "NAME" globus-gridftp-server-setup-chroot - creates the specific contents of a directory that can specified as a root of the file system tree exposed by the Globus GridFTP server .SH "SYNOPSYS" .B "globus-gridftp-server-setup-chroot" [-c certificate_dir] -r chroot_path_to_create .SH "DESCRIPTION" GridFTP server can be configured to restrict access to specific path using the command line option \fB-chroot-path\fR of the \fBglobus-gridftp-server\fR command. The specified path will become the new root after authentication. That path must contain a valid certificate structure, and the files /etc/passwd and /etc/groups. The command \fBglobus-gridftp-server-setup-chroot\fR helps creating such a suitable directory structure. .SH "OPTIONS" .TP \fB\-r chroot_path_to_create\fR Creates in \fBchroot_path_to_create\fR the directory structure expected by the \fBglobus-gridftp-server\fR command, when started with \fB-chroot-path\fR command line option. .TP .B "-c certificate_dir" Specifies explicitly the directory from which the certificates will be copied into the directory \fBchroot_path_to_create\fR. The default path is \fB/etc/grid-security/certificates\fR. .SH AUTHOR Initiative for Globus in Europe (IGE), http://www.ige-project.eu .SH COPYRIGHT Copyright \(co 2012 Initiative for Globus in Europe (IGE) .SH "SEE ALSO" globus-gridftp-server(8) debian/copyright0000644000000000000000000000152612240645143011126 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: globus_gridftp_server Upstream-Contact: http://www.globus.org/ Source: http://www.globus.org/ftppub/gt5/5.2/5.2.5/packages/src/globus_gridftp_server-6.38.tar.gz Files: * Copyright: 1999-2013 University of Chicago License: Apache-2.0 Files: globus_gridftp_server_embed.h globus_i_gfs_embed.c embed/globus_gridftp_server_embedded.c Copyright: 1999-2005 University of Chicago 1999-2005 University of Southern California License: Apache-2.0 Files: debian/* Copyright: 2008-2013 Mattias Ellert 2010-2013 Initiative for Globus in Europe (IGE), http://www.ige-project.eu/ License: Apache-2.0 License: Apache-2.0 On Debian systems the full text of the Apache license version 2 can be found in /usr/share/common-licenses/Apache-2.0. debian/globus-gridftp-server-progs.globus-gridftp-sshftp.init0000644000000000000000000000375011710567030021700 0ustar #!/bin/bash # # globus-gridftp-sshftp # # chkconfig: 2345 20 80 # description: Controls sshftp access to the globus-gridftp-server. # ### BEGIN INIT INFO # Provides: globus-gridftp-sshftp # Required-Start: $remote_fs $syslog $network # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Globus GridFTP SSHFTP # Description: sshftp access to the Globus Gridftp Server ### END INIT INFO # source function library . /lib/lsb/init-functions sbindir=/usr/sbin sysconfdir=/etc rc=0 defaultconf=${sysconfdir}/gridftp-sshftp enabledconf=/etc/grid-security/sshftp # Include defaults if available if [ -r /etc/sysconfig/globus-gridftp-sshftp ] ; then . /etc/sysconfig/globus-gridftp-sshftp fi start() { echo -n "Enabling sshftp access to globus-gridftp-server" if [ ! -f $defaultconf ]; then ${sbindir}/globus-gridftp-server-enable-sshftp -out $defaultconf rc=$? fi if [ $rc -eq 0 -a ! -d /etc/grid-security ] ; then mkdir /etc/grid-security rc=$? fi if [ $rc -eq 0 -a ! -f $enabledconf ]; then ln -s $defaultconf $enabledconf rc=$? fi [ $rc -eq 0 ] && log_success_msg || log_failure_msg echo return $rc } stop() { echo -n "Disabling sshftp access to globus-gridftp-server" if [ -L $enabledconf ]; then rm $enabledconf rc=$? elif [ -f $enabledconf ]; then mv $enabledconf ${enabledconf}.save rc=$? fi [ $rc -eq 0 ] && log_success_msg || log_failure_msg echo return $rc } case "$1" in start) start ;; stop) stop ;; status) if [ -f $enabledconf ]; then echo "sshftp access to globus-gridftp-server is enabled." exit 0 else echo "sshftp access to globus-gridftp-server is disabled." exit 3 fi ;; restart|force-reload) stop start ;; reload) ;; reconfigure) stop ${sbindir}/globus-gridftp-server-enable-sshftp -force -out $defaultconf start ;; *) echo "Usage: $0 {start|stop|status|restart|reload|reconfigure}" exit 1 ;; esac exit $rc debian/compat0000644000000000000000000000000211677222741010375 0ustar 5 debian/libglobus-gridftp-server6.shlibs0000644000000000000000000000007411722105520015401 0ustar libglobus_gridftp_server 6 libglobus-gridftp-server6 (>= 6) debian/changelog0000644000000000000000000001262612240133774011052 0ustar globus-gridftp-server (6.38-1) unstable; urgency=low * Update to Globus Toolkit 5.2.5 * Drop patch globus-gridftp-server-ac.patch (fixed upstream) * Implement Multi-Arch support * Split dbg package for Multi-Arch -- Mattias Ellert Mon, 11 Nov 2013 11:31:47 +0100 globus-gridftp-server (6.19-2) unstable; urgency=low * Add arm64 to the list of 64 bit architectures * Don't use AM_CONFIG_HEADER (automake 1.13) -- Mattias Ellert Sun, 26 May 2013 21:15:55 +0200 globus-gridftp-server (6.19-1) unstable; urgency=low * Update to Globus Toolkit 5.2.4 -- Mattias Ellert Wed, 20 Feb 2013 14:51:01 +0100 globus-gridftp-server (6.16-1) unstable; urgency=low * Update to Globus Toolkit 5.2.3 (Closes: #690652) -- Mattias Ellert Sun, 16 Dec 2012 18:50:24 +0100 globus-gridftp-server (6.14-1) unstable; urgency=low * Update to Globus Toolkit 5.2.2 * Drop patch globus-gridftp-server-pw195.patch (was backport) * Drop patch globus-gridftp-server-format.patch (fixed upstream) -- Mattias Ellert Mon, 23 Jul 2012 12:54:33 +0200 globus-gridftp-server (6.10-2) unstable; urgency=high * Backport security fix for JIRA ticket GT-195 -- Mattias Ellert Fri, 25 May 2012 17:57:34 +0200 globus-gridftp-server (6.10-1) unstable; urgency=low * Update to Globus Toolkit 5.2.1 * Drop patches globus-gridftp-server-deps.patch, globus-gridftp-server-funcgrp.patch, globus-gridftp-server-pathmax.patch and globus-gridftp-server-compat.patch (fixed upstream) * Drop globus-gridftp-server man page from packaging since it is now included in upstream sources * Add additional contributed man pages -- Mattias Ellert Sun, 29 Apr 2012 17:28:45 +0200 globus-gridftp-server (6.5-6) unstable; urgency=medium * Restore enum and struct member order for improved backward compatibility -- Mattias Ellert Mon, 12 Mar 2012 20:43:42 +0100 globus-gridftp-server (6.5-5) unstable; urgency=medium * The last update broke backwards compatibility and should have bumped the soname - so do it now * Add patch from upstream to reduce the chance of backward incompatible changes in the future -- Mattias Ellert Sat, 25 Feb 2012 08:14:53 +0100 globus-gridftp-server (6.5-4) unstable; urgency=low * debian/rules cleanup -- Mattias Ellert Tue, 24 Jan 2012 22:01:32 +0100 globus-gridftp-server (6.5-3) unstable; urgency=low * One more portability fix -- Mattias Ellert Sat, 21 Jan 2012 08:58:49 +0100 globus-gridftp-server (6.5-2) unstable; urgency=low * Portability fixes * Fix broken links in README file -- Mattias Ellert Thu, 19 Jan 2012 05:31:25 +0100 globus-gridftp-server (6.5-1) unstable; urgency=low * Update to Globus Toolkit 5.2.0 * Drop patches globus-gridftp-server-etc.patch, globus-gridftp-server-pathmax.patch and globus-gridftp-server-usr.patch (fixed upstream) -- Mattias Ellert Fri, 30 Dec 2011 03:45:53 +0100 globus-gridftp-server (3.33-3) unstable; urgency=low * Update contributed manpage * Fix wrong library name in package metadata (Closes: #641600) -- Mattias Ellert Sun, 02 Oct 2011 14:40:47 +0200 globus-gridftp-server (3.33-2) unstable; urgency=low * Source default (Closes: #635011) -- Mattias Ellert Tue, 26 Jul 2011 17:31:35 +0200 globus-gridftp-server (3.33-1) unstable; urgency=low * Update to Globus Toolkit 5.0.4 -- Mattias Ellert Mon, 06 Jun 2011 15:05:57 +0200 globus-gridftp-server (3.28-3) unstable; urgency=low * Add README file * Add missing dependencies -- Mattias Ellert Wed, 27 Apr 2011 05:38:16 +0200 globus-gridftp-server (3.28-2) unstable; urgency=low * Add start-up script and man page for globus-gridftp-server -- Mattias Ellert Tue, 19 Apr 2011 08:56:19 +0200 globus-gridftp-server (3.28-1) unstable; urgency=low * Update to Globus Toolkit 5.0.3 -- Mattias Ellert Sun, 27 Feb 2011 06:45:26 +0100 globus-gridftp-server (3.23-1) unstable; urgency=low * Update to Globus Toolkit 5.0.2 -- Mattias Ellert Mon, 19 Jul 2010 13:51:09 +0200 globus-gridftp-server (3.21-2) unstable; urgency=low * Converting to package format 3.0 (quilt) -- Mattias Ellert Fri, 04 Jun 2010 04:43:30 +0200 globus-gridftp-server (3.21-1) unstable; urgency=low * Update to Globus Toolkit 5.0.1 -- Mattias Ellert Thu, 15 Apr 2010 17:09:19 +0200 globus-gridftp-server (3.19-1) unstable; urgency=low * Update to Globus Toolkit 5.0.0 * Add debug package -- Mattias Ellert Wed, 27 Jan 2010 15:33:50 +0100 globus-gridftp-server (3.17-2) unstable; urgency=low * Fix location of default config file -- Mattias Ellert Mon, 09 Nov 2009 04:28:37 +0100 globus-gridftp-server (3.17-1) unstable; urgency=low * Initial release (Closes: #540259). -- Mattias Ellert Fri, 07 Aug 2009 07:24:28 +0200 debian/source/0000755000000000000000000000000011677222741010477 5ustar debian/source/format0000644000000000000000000000001411677222741011705 0ustar 3.0 (quilt) debian/globus-gridftp-server-progs.globus-gridftp-server.init0000644000000000000000000000574211677227051021712 0ustar #!/bin/bash # # globus-gridftp-server - Globus GridFTP Server # chkconfig: 2345 20 80 # description: The Globus GridFTP server is a process which implements the \ # GridFTP protocol for secure, high-performance file transfer. # ### BEGIN INIT INFO # Provides: globus-gridftp-server # Required-Start: $remote_fs $syslog $network # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Globus GridFTP Server # Description: The Globus GridFTP server is a process which implements # the GridFTP protocol for secure, high-performance file # transfer. ### END INIT INFO # source function library . /lib/lsb/init-functions sbindir=/usr/sbin sysconfdir=/etc rc=0 conf=${sysconfdir}/gridftp.conf confdir=${sysconfdir}/gridftp.d pidfile=/var/run/globus-gridftp-server.pid lockfile=/var/lock/globus-gridftp-server gridftpd=${sbindir}/globus-gridftp-server # Include defaults if available if [ -r /etc/default/globus-gridftp-server ] ; then . /etc/default/globus-gridftp-server fi start() { echo -n "Starting globus-gridftp-server" rc=0 if [ ! -f $conf ]; then touch $conf fi if [ -f "$pidfile" ]; then read pid < "$pidfile" if ! kill -0 $pid; then rm "$pidfile" fi fi if [ ! -d $confdir ]; then mkdir $confdir; fi if [ ! -f "$pidfile" ]; then $gridftpd -S -c $conf -C $confdir -pidfile "${pidfile}" rc=$? fi [ $rc -eq 0 ] && log_success_msg || log_failure_msg [ $rc -eq 0 ] && touch ${lockfile} echo return $rc } stop() { echo -n "Stopping globus-gridftp-server" if [ -f "$pidfile" ]; then read pid < "$pidfile" 2> /dev/null if [ "$pid" != "" -a "$pid" -gt 0 ]; then if kill -0 "$pid" 2> /dev/null; then kill -INT "$pid" 2>/dev/null rc=$? sleep 2 kill -0 "$pid" 2> /dev/null && kill -KILL "$pid" fi fi rm -f "$pidfile" fi [ $rc -eq 0 ] && log_success_msg || log_failure_msg [ $rc -eq 0 ] && rm ${lockfile} echo return $rc } restart() { stop start } reload() { echo -n "Reloading GridFTP configuration" read pid < "$pidfile" 2> /dev/null if [ "$pid" != "" -a "$pid" -gt 0 ]; then kill -HUP "$pid" 2>/dev/null rc=$? fi [ $rc -eq 0 ] && log_success_msg || log_failure_msg return $rc } status() { if [ -f $pidfile ]; then read pid < "$pidfile" 2> /dev/null if [ "$pid" != "" -a "$pid" -gt 0 ]; then if kill -0 "$pid" 2> /dev/null; then echo "GridFTP server is running (pid=$pid)" return 0 else echo "Stale PID file $pidfile" return 1 fi else echo "Invalid PID file $pidfile" return 4 fi else echo "GridFTP server is not running" return 3 fi } case "$1" in start) start ;; stop) stop ;; status) status ;; restart | force-reload) restart ;; condrestart | try-restart) [ -e ${lockfile} ] && restart ;; reload) reload ;; *) echo "Usage: $0 {start|stop|status|restart|force-reload|condrestart|try-restart|reload}" exit 1 ;; esac exit $rc