Summary: Baculum WebGUI tool for Bacula Community program
Name: baculum
-Version: 7.0.20150315git
+Version: 7.0.20150317git
Release: 1%{?dist}
License: AGPLv3
Group: Applications/Internet
URL: http://bacula.org
Requires: lighttpd
Requires: lighttpd-fastcgi
-Requires: php
+Requires: bacula-console
+Requires: php >= 5.3.4
Requires: php-bcmath
Requires: php-common
Requires: php-mbstring
Requires: php-pdo
Requires: php-pgsql
Requires: php-xml
-Requires(post): chkconfig
-Requires(preun):chkconfig
+Requires(post): /sbin/chkconfig
+Requires(preun):/sbin/service, /sbin/chkconfig
+BuildArch: noarch
%description
The Baculum program allows the user to administrate and manage Bacula work.
%attr(-,lighttpd,lighttpd) /usr/share/baculum/htdocs
%attr(-,lighttpd,lighttpd) /etc/baculum
%attr(755,root,root) /etc/rc.d/init.d/baculum
+%config /etc/sysconfig/baculum
+
+%doc AUTHORS INSTALL README LICENSE
%install
mkdir -p %{buildroot}/usr/share/baculum/htdocs
mkdir -p %{buildroot}/etc/baculum
+mkdir -p %{buildroot}/etc/sysconfig
mkdir -p %{buildroot}/etc/rc.d/init.d
-cp -ra . %{buildroot}/usr/share/baculum/htdocs
+cp -ra assets framework protected themes index.php AUTHORS INSTALL LICENSE README index.php %{buildroot}/usr/share/baculum/htdocs
install -m 640 examples/rpm/baculum.lighttpd.conf %{buildroot}/etc/baculum/
install -m 600 examples/rpm/baculum.users %{buildroot}/etc/baculum/
install -m 755 examples/rpm/baculum.startup %{buildroot}/etc/rc.d/init.d/baculum
+install -m 644 examples/rpm/baculum.sysconfig %{buildroot}/etc/sysconfig/baculum
%post
-ln -s /etc/baculum/baculum.users /usr/share/baculum/htdocs/protected/Data/baculum.users
/sbin/chkconfig --add /etc/rc.d/init.d/baculum
+[ -e /usr/share/baculum/htdocs/protected/Data/baculum.users ] || ln -s /etc/baculum/baculum.users /usr/share/baculum/htdocs/protected/Data/baculum.users
%preun
if [ $1 -eq 0 ] ; then
/sbin/service baculum stop
/sbin/chkconfig --del baculum
fi
+
+%changelog
+ * Wed Mar 18 2015 Marcin Haba <marcin.haba@bacula.pl> - 7.0.20150317git
+ - Spec create
\ No newline at end of file
#!/bin/sh
+#
+# chkconfig: 2345 91 9
+# description: This script uses Lighttpd web server for \
+# working Baculum WebGUI tool.
+#
+
### BEGIN INIT INFO
# Provides: baculum
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Default-Stop: 0 1 6
# Short-Description: Start/stop Baculum
# Description: Start the Baculum WebGUI Bacula Community tool.
-# This script uses Lighttpd web server for working Baculum WebGUI tool.
### END INIT INFO
DESC="Baculum WebGUI Bacula Community tool"
SCRIPTNAME=/etc/init.d/$NAME
DAEMON=/usr/sbin/lighttpd
DAEMON_OPTS="-f /etc/baculum/baculum.lighttpd.conf"
-PIDFILE="/var/run/$NAME.pid"
+PIDFILE=/var/run/$NAME.pid
+LOCKFILE=/var/lock/subsys/$NAME
test -x $DAEMON || exit 0
logger ${RES:=FAIL}
}
+rh_status() {
+ status $prog
+}
+
if test -f /lib/lsb/init-functions; then
. /lib/lsb/init-functions
fi
log_end_msg 1
else
log_end_msg 0
+ touch $LOCKFILE
fi
;;
stop)
if kill -TERM `<$PIDFILE`
then
rm -f $PIDFILE
+ rm -f $LOCKFILE
log_end_msg 0
else
log_end_msg 1
fi
;;
+ status)
+ rh_status
+ ;;
restart)
check_syntax
$0 stop
$0 start
;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|status}" >&2
exit 1
;;
esac