]> git.pld-linux.org Git - packages/stunnel.git/commitdiff
- came on, lazy people.
authorserek <serek@pld-linux.org>
Mon, 31 Mar 2003 20:10:39 +0000 (20:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    stunnel.init -> 1.1
    stunnel.spec -> 1.56
    stunnel.sysconfig -> 1.1

stunnel.init [new file with mode: 0644]
stunnel.spec
stunnel.sysconfig [new file with mode: 0644]

diff --git a/stunnel.init b/stunnel.init
new file mode 100644 (file)
index 0000000..ca1d2c9
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# stunnel      stunnel (Universal SSL tunnel)
+#
+# chkconfig:    345 14 91      
+#
+# description: stunnel (Universal SSL tunnel)
+#
+# id:          $Id$
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/stunnel ] && . /etc/sysconfig/stunnel
+
+# Check that networking is up.
+if is_no "${NETWORKING}"; then
+        msg_network_down stunnel
+        exit 1
+fi
+
+# Daemon doesn't die if config doesn't exist
+if [ ! -f $STUNNEL_CONFIG ]; then
+       echo "Stunnel config $STUNNEL_CONFIG does not exist."
+       exit 1
+fi
+
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/stunnel ]; then
+               msg_starting stunnel; busy
+               daemon stunnel $STUNNEL_CONFIG
+               RETVAL=$?
+                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/stunnel
+       else
+               msg_already_running stunnel
+               exit 1
+       fi
+       ;;
+  stop)
+        if [ -f /var/lock/subsys/stunnel ]; then
+               msg_stopping stunnel
+               killproc stunnel
+               rm -f /var/run/stunnel/stunnel.pid /var/lock/subsys/stunnel >/dev/null 2>&1
+       else
+               msg_not_running stunnel
+               exit 1
+       fi      
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       ;;
+  status)
+       status stunnel
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|status|restart}"
+       exit 1
+esac
+
+exit $RETVAL
index 5c5632f3b7b814c1b57900134ed0a9fac1e85dc8..350cb827b5f96614f91c6f275adbe930ca6a32ab 100644 (file)
@@ -2,10 +2,12 @@ Summary:      Universal SSL tunnel
 Summary(pl):   Uniwersalne narzêdzie do bezpiecznego tunelowania
 Name:          stunnel
 Version:       4.04
-Release:       0.2
+Release:       0.9
 License:       GPL v2
 Group:         Networking/Daemons
 Source0:       ftp://stunnel.mirt.net/stunnel/%{name}-%{version}.tar.gz
+Source1:       %{name}.init
+Source2:       %{name}.sysconfig
 Patch0:                %{name}-gethostbyname_is_in_libc_aka_no_libnsl.patch
 Patch1:                %{name}-authpriv.patch
 Patch2:                %{name}-ac_fixes.patch
@@ -52,12 +54,17 @@ rm -f missing
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_mandir}/pl/man8
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
+       -d $RPM_BUILD_ROOT%{_mandir}/pl/man8 \
+       -d $RPM_BUILD_ROOT%{_var}/run/stunnel
 
 %{__make} install DESTDIR=$RPM_BUILD_ROOT
 
 mv -f $RPM_BUILD_ROOT/%{_mandir}/man8/stunnel.pl.8* $RPM_BUILD_ROOT/%{_mandir}/pl/man8/
 
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/stunnel
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/stunnel
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -71,6 +78,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc $RPM_BUILD_ROOT%{_datadir}/doc/stunnel/examples/{c*,i*,stunnel.init}
 %doc %lang(pl) doc/pl/* doc/stunnel.pl.html
 %dir /etc/stunnel
+%attr(755,root,root) /etc/rc.d/init.d/stunnel
+%attr(600,root,root) /etc/sysconfig/stunnel
+%attr(700,nobody,nobody) %{_var}/run/stunnel
 %config(noreplace) %verify(not size mtime md5) /etc/stunnel/*
 %attr(755,root,root) %{_sbindir}/*
 %attr(755,root,root) %{_libdir}/*
diff --git a/stunnel.sysconfig b/stunnel.sysconfig
new file mode 100644 (file)
index 0000000..ef31af5
--- /dev/null
@@ -0,0 +1,7 @@
+# Customized settings for stunnel
+
+# Define nice level for stunnel
+SERVICE_RUN_NICE_LEVEL="+0"
+
+# Where is stunnel config?
+STUNNEL_CONFIG="/etc/stunnel/stunnel.conf"
This page took 0.060486 seconds and 4 git commands to generate.