]> git.pld-linux.org Git - packages/func.git/commitdiff
- initial PLD release
authorPatryk Zawadzki <patrys@room-303.com>
Tue, 4 Dec 2007 17:24:50 +0000 (17:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    func-certmaster.init -> 1.1
    func-funcd.init -> 1.1
    func.spec -> 1.1

func-certmaster.init [new file with mode: 0755]
func-funcd.init [new file with mode: 0644]
func.spec [new file with mode: 0644]

diff --git a/func-certmaster.init b/func-certmaster.init
new file mode 100755 (executable)
index 0000000..eba288e
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# func:                Starts the func certmaster daemon
+#
+# Version:     @(#) /etc/rc.d/init.d/func 0.1
+#
+# chkconfig:   - 98 99
+# description: Starts and stops the func daemon at startup and shutdown..
+
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/certmaster ]; then
+               msg_starting "certmaster"
+               daemon /usr/bin/certmaster
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/certmaster
+       else
+               msg_already_running "certmaster"
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/certmaster ]; then
+               msg_stopping "certmaster"
+               killproc certmaster
+               rm -f /var/lock/subsys/certmaster
+       else
+               msg_not_running "certmaster"
+       fi
+       ;;
+  status)
+       status certmaster
+       exit $?
+       ;;
+  restart|force-reload)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/func-funcd.init b/func-funcd.init
new file mode 100644 (file)
index 0000000..f08838b
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# func:                Starts the func daemon
+#
+# Version:     @(#) /etc/rc.d/init.d/func 0.1
+#
+# chkconfig:   - 98 99
+# description: Starts and stops the func daemon at startup and shutdown..
+
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/funcd ]; then
+               msg_starting "funcd"
+               daemon /usr/bin/funcd
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/funcd
+       else
+               msg_already_running "funcd"
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/funcd ]; then
+               msg_stopping "funcd"
+               killproc funcd
+               rm -f /var/lock/subsys/funcd
+       else
+               msg_not_running "funcd"
+       fi
+       ;;
+  status)
+       status funcd
+       exit $?
+       ;;
+  restart|force-reload)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/func.spec b/func.spec
new file mode 100644 (file)
index 0000000..200ffa6
--- /dev/null
+++ b/func.spec
@@ -0,0 +1,76 @@
+%define                subver  .3
+Summary:       Fedora Unified Network Controller
+Name:          func
+Version:       0.13
+Release:       1
+License:       GPLv2+
+Group:         Applications/System
+Source0:       https://hosted.fedoraproject.org/projects/func/attachment/wiki/FuncReleases/%{name}-%{version}.tar%{subver}.gz?format=raw
+# Source0-md5: adf06e92209e2576bd44fa64641b8733
+Source1:       %{name}-funcd.init
+Source2:       %{name}-certmaster.init
+URL:           https://hosted.fedoraproject.org/projects/func/
+BuildRequires: python >= 1:2.5
+BuildRequires: rpmbuild(macros) >= 1.219
+Requires:      python-pyOpenSSL
+%pyrequires_eq python-libs
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+func is a remote api for mangement, configation, and monitoring of systems.
+
+%prep
+%setup -q
+
+%build
+python setup.py build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/funcd
+
+python setup.py install \
+       --root=$RPM_BUILD_ROOT \
+       --optimize=2
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/funcd
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/certmaster
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add certmaster
+/sbin/chkconfig --add funcd
+
+%preun
+if [ "$1" = "0" ]; then
+       %service certmaster stop
+       %service funcd stop
+       /sbin/chkconfig --del certmaster
+       /sbin/chkconfig --del funcd
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS README
+%attr(755,root,root) %{_bindir}/funcd
+%attr(755,root,root) %{_bindir}/func
+%attr(755,root,root) %{_bindir}/certmaster
+%attr(755,root,root) %{_bindir}/certmaster-ca
+%attr(755,root,root) %{_bindir}/func-inventory
+%dir %{_sysconfdir}/%{name}
+%dir %{_sysconfdir}/%{name}/minion-acl.d/
+# TODO: move /etc/pki into FHS? It's used for key storage
+%dir %{_sysconfdir}/pki
+%dir %{_sysconfdir}/pki/%{name}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/func/minion.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/func/certmaster.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/logrotate.d/func_rotate
+%attr(755,root,root) /etc/rc.d/init.d/certmaster
+%attr(755,root,root) /etc/rc.d/init.d/funcd
+%{py_sitescriptdir}/func-%{version}-py*.egg-info
+%{py_sitescriptdir}/func
+%{_mandir}/man1/*.1*
This page took 0.042842 seconds and 4 git commands to generate.