Move RPM pkg files to rpm directory
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 28 Apr 2011 10:37:52 +0000 (12:37 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 28 Apr 2011 10:37:52 +0000 (12:37 +0200)
pazpar2.spec
rpm/pazpar2.init [new file with mode: 0755]
rpm/pazpar2.logrotate [new file with mode: 0644]
src/pazpar2.rpm.init [deleted file]
src/pazpar2.rpm.logrotate [deleted file]

index 24b42b2..3cfafe2 100644 (file)
@@ -82,10 +82,10 @@ cp etc/services/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/services-available/
 cp etc/settings/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/settings/
 cp etc/*.xsl ${RPM_BUILD_ROOT}/etc/pazpar2/
 mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d
-install -m755 src/pazpar2.rpm.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/pazpar2
+install -m755 rpm/pazpar2.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/pazpar2
 echo "Alias /pazpar2 /usr/share/pazpar2" >${RPM_BUILD_ROOT}/etc/pazpar2/ap2pazpar2-js.cfg
 mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
-install -m644 src/pazpar2.rpm.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/pazpar2
+install -m644 rpm/pazpar2.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/pazpar2
 
 %clean
 rm -fr ${RPM_BUILD_ROOT}
diff --git a/rpm/pazpar2.init b/rpm/pazpar2.init
new file mode 100755 (executable)
index 0000000..da5d642
--- /dev/null
@@ -0,0 +1,82 @@
+#!/bin/bash
+#
+# pazpar2      Startup script for Pazpar2
+#
+# chkconfig: - 85 15
+# description: Pazpar2 Metasearcher
+# processname: pazpar2
+# config: /etc/pazpar2/server.xml
+# config: /etc/sysconfig/pazpar2
+# pidfile: /var/run/pazpar2.pid
+
+# Source function library.
+OPTIONS="-l /var/log/pazpar2.log -f /etc/pazpar2/server.xml"
+. /etc/rc.d/init.d/functions
+
+if [ -f /etc/sysconfig/pazpar2 ]; then
+        . /etc/sysconfig/pazpar2
+fi
+
+# Path to the apachectl script, server binary, and short-form for messages.
+DAEMON=${DAEMON-/usr/sbin/pazpar2}
+prog=pazpar2
+pidfile=${PIDFILE-/var/run/pazpar2.pid}
+lockfile=${LOCKFILE-/var/lock/subsys/pazpar2}
+RETVAL=0
+
+start() {
+        echo -n $"Starting $prog: "
+        daemon --pidfile=${pidfile} $DAEMON $OPTIONS -D -p ${pidfile}
+        RETVAL=$?
+        echo
+        [ $RETVAL = 0 ] && touch ${lockfile}
+        return $RETVAL
+}
+
+stop() {
+       echo -n $"Stopping $prog: "
+       killproc -p ${pidfile} -d 10 $DAEMON
+       RETVAL=$?
+       echo
+       [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
+}
+reload() {
+    stop
+    start
+}
+
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  status)
+        status -p ${pidfile} $DAEMON
+       RETVAL=$?
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  condrestart)
+       if [ -f ${pidfile} ] ; then
+               stop
+               start
+       fi
+       ;;
+  reload)
+        reload
+       ;;
+  configtest)
+       $DAEMON $OPTIONS -t
+       RETVAL=$?
+       ;;
+  *)
+       echo $"Usage: $prog {start|stop|restart|help|configtest}"
+       exit 1
+esac
+
+exit $RETVAL
diff --git a/rpm/pazpar2.logrotate b/rpm/pazpar2.logrotate
new file mode 100644 (file)
index 0000000..b2bd6fb
--- /dev/null
@@ -0,0 +1,13 @@
+/var/log/pazpar2.log {
+       weekly
+       missingok
+       rotate 4
+       compress
+       delaycompress
+       notifempty
+       postrotate
+               if [ -f /var/run/pazpar2.pid ]; then
+                       /sbin/service pazpar2 restart > /dev/null
+               fi
+       endscript
+}
diff --git a/src/pazpar2.rpm.init b/src/pazpar2.rpm.init
deleted file mode 100755 (executable)
index da5d642..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/bash
-#
-# pazpar2      Startup script for Pazpar2
-#
-# chkconfig: - 85 15
-# description: Pazpar2 Metasearcher
-# processname: pazpar2
-# config: /etc/pazpar2/server.xml
-# config: /etc/sysconfig/pazpar2
-# pidfile: /var/run/pazpar2.pid
-
-# Source function library.
-OPTIONS="-l /var/log/pazpar2.log -f /etc/pazpar2/server.xml"
-. /etc/rc.d/init.d/functions
-
-if [ -f /etc/sysconfig/pazpar2 ]; then
-        . /etc/sysconfig/pazpar2
-fi
-
-# Path to the apachectl script, server binary, and short-form for messages.
-DAEMON=${DAEMON-/usr/sbin/pazpar2}
-prog=pazpar2
-pidfile=${PIDFILE-/var/run/pazpar2.pid}
-lockfile=${LOCKFILE-/var/lock/subsys/pazpar2}
-RETVAL=0
-
-start() {
-        echo -n $"Starting $prog: "
-        daemon --pidfile=${pidfile} $DAEMON $OPTIONS -D -p ${pidfile}
-        RETVAL=$?
-        echo
-        [ $RETVAL = 0 ] && touch ${lockfile}
-        return $RETVAL
-}
-
-stop() {
-       echo -n $"Stopping $prog: "
-       killproc -p ${pidfile} -d 10 $DAEMON
-       RETVAL=$?
-       echo
-       [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
-}
-reload() {
-    stop
-    start
-}
-
-# See how we were called.
-case "$1" in
-  start)
-       start
-       ;;
-  stop)
-       stop
-       ;;
-  status)
-        status -p ${pidfile} $DAEMON
-       RETVAL=$?
-       ;;
-  restart)
-       stop
-       start
-       ;;
-  condrestart)
-       if [ -f ${pidfile} ] ; then
-               stop
-               start
-       fi
-       ;;
-  reload)
-        reload
-       ;;
-  configtest)
-       $DAEMON $OPTIONS -t
-       RETVAL=$?
-       ;;
-  *)
-       echo $"Usage: $prog {start|stop|restart|help|configtest}"
-       exit 1
-esac
-
-exit $RETVAL
diff --git a/src/pazpar2.rpm.logrotate b/src/pazpar2.rpm.logrotate
deleted file mode 100644 (file)
index b2bd6fb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/var/log/pazpar2.log {
-       weekly
-       missingok
-       rotate 4
-       compress
-       delaycompress
-       notifempty
-       postrotate
-               if [ -f /var/run/pazpar2.pid ]; then
-                       /sbin/service pazpar2 restart > /dev/null
-               fi
-       endscript
-}