initscripts improvements and fixed menu entries

This commit is contained in:
Jan Görig 2010-06-02 10:29:08 +00:00
parent d1fa04c4eb
commit ddc0d55d7c
11 changed files with 61 additions and 52 deletions

View File

@ -4,7 +4,7 @@ Encoding=UTF-8
Name=Bacula Bat Console
GenericName=Backup Management Console
Comment=Control your Bacula Server
Exec=/usr/sbin/bat -c /etc/bacula/bat.conf
Exec=/usr/bin/bat -c /etc/bacula/bat.conf
Icon=bat_icon
Terminal=false
Type=Application

View File

@ -4,7 +4,7 @@ Encoding=UTF-8
Name=Bacula WX Console
GenericName=Backup Management Console
Comment=Control your Bacula Server
Exec=/usr/sbin/bwxconsole -c /etc/bacula/bwxconsole.conf
Exec=/usr/bin/bwxconsole -c /etc/bacula/bwxconsole.conf
Icon=wxwin16x16
Terminal=false
Type=Application

View File

@ -30,7 +30,7 @@ checkconf() {
# If yes, refuse to start, the user has never touched the config.
grep -q '^[^#].*_PASSWORD@@' $CONFIG
if [ $? -eq 0 ]; then
echo -n "Error: Not been configured"
echo -n "Error: Program has not been configured"
echo_failure
echo
exit 1
@ -50,7 +50,7 @@ checkdatabase() {
# Check if mysqld is running
service mysqld status > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo -n "Error: MySQL not running"
echo -n "Error: MySQL is not running"
echo_failure
echo
exit 1
@ -60,7 +60,7 @@ checkdatabase() {
# Check if postgresql is running
service postgresql status > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo -n "Error: PostgreSQL not running"
echo -n "Error: PostgreSQL is not running"
echo_failure
echo
exit 1
@ -76,6 +76,8 @@ checkdatabase() {
}
start() {
[ "$EUID" != "0" ] && exit 4
echo -n "Starting $prog: "
checkconf
# Removed for now, as the db might not be on localhost
@ -88,6 +90,8 @@ start() {
}
stop() {
[ "$EUID" != "0" ] && exit 4
echo -n "Shutting down $prog: "
killproc $prog
RETVAL=$?
@ -106,23 +110,22 @@ case "$1" in
status)
status $prog
;;
restart)
stop
restart|force-reload)
stop
start
RETVAL=$?
;;
reload)
;;
condrestart)
condrestart|try-restart)
if [ -f /var/lock/subsys/$prog ]; then
stop
start
RETVAL=$?
fi
;;
*)
echo "Usage: $prog {start|stop|status|reload|restart}"
exit 1
echo "Usage: $prog {start|stop|restart|condrestart|try-restart|reload|force-reload|status|usage}"
[ "$1" = "usage" ] && exit 0
exit 2
;;
esac
exit $?

View File

@ -30,7 +30,7 @@ checkconf() {
# If yes, refuse to start, the user has never touched the config.
grep -q '_PASSWORD@@' $CONFIG
if [ $? -eq 0 ]; then
echo -n "Error: Not been configured"
echo -n "Error: Program has not been configured"
echo_failure
echo
exit 1
@ -39,6 +39,8 @@ checkconf() {
start() {
[ "$EUID" != "0" ] && exit 4
echo -n "Starting $prog: "
checkconf
daemon $prog $OPTS
@ -49,6 +51,8 @@ start() {
}
stop() {
[ "$EUID" != "0" ] && exit 4
echo -n "Shutting down $prog: "
killproc $prog
RETVAL=$?
@ -67,23 +71,22 @@ case "$1" in
status)
status $prog
;;
restart)
stop
restart|force-reload)
stop
start
RETVAL=$?
;;
reload)
;;
condrestart)
condrestart|try-restart)
if [ -f /var/lock/subsys/$prog ]; then
stop
start
RETVAL=$?
fi
;;
*)
echo "Usage: $prog {start|stop|status|reload|restart}"
exit 1
echo "Usage: $prog {start|stop|restart|condrestart|try-restart|reload|force-reload|status|usage}"
[ "$1" = "usage" ] && exit 0
exit 2
;;
esac
exit $?

View File

@ -29,7 +29,7 @@ checkconf() {
# If yes, refuse to start, the user has never touched the config.
grep -q '^[^#].*_PASSWORD@@' $CONFIG
if [ $? -eq 0 ]; then
echo -n "Error: Not been configured"
echo -n "Error: Program has not been configured"
echo_failure
echo
exit 1
@ -49,7 +49,7 @@ checkdatabase() {
# Check if mysqld is running
service mysqld status > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo -n "Error: MySQL not running"
echo -n "Error: MySQL is not running"
echo_failure
echo
exit 1
@ -59,7 +59,7 @@ checkdatabase() {
# Check if postgresql is running
service postgresql status > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo -n "Error: PostgreSQL not running"
echo -n "Error: PostgreSQL is not running"
echo_failure
echo
exit 1
@ -75,6 +75,8 @@ checkdatabase() {
}
start() {
[ "$EUID" != "0" ] && exit 4
echo -n "Starting $prog: "
checkconf
# Disabled, the DB does not necessarily run on the same machine
@ -87,6 +89,8 @@ start() {
}
stop() {
[ "$EUID" != "0" ] && exit 4
echo -n "Shutting down $prog: "
killproc $prog
RETVAL=$?
@ -105,23 +109,22 @@ case "$1" in
status)
status $prog
;;
restart)
stop
restart|force-reload)
stop
start
RETVAL=$?
;;
reload)
;;
condrestart)
condrestart|try-restart)
if [ -f /var/lock/subsys/$prog ]; then
stop
start
RETVAL=$?
fi
;;
*)
echo "Usage: $prog {start|stop|status|reload|restart}"
exit 1
echo "Usage: $prog {start|stop|restart|condrestart|try-restart|reload|force-reload|status|usage}"
[ "$1" = "usage" ] && exit 0
exit 2
;;
esac
exit $?

View File

@ -0,0 +1,3 @@
USER=root
PROGRAM=/usr/sbin/bacula-tray-monitor
SESSION=true

View File

@ -4,7 +4,7 @@ Encoding=UTF-8
Name=Bacula Monitor
GenericName=Bacula Tray Monitor
Comment=Monitor your Bacula Backup server
Exec=/usr/sbin/bacula-tray-monitor -c /etc/bacula/tray-monitor.conf
Exec=/usr/bin/bacula-tray-monitor -c /etc/bacula/tray-monitor.conf
Icon=bacula-tray-monitor.xpm
Terminal=false
Type=Application

View File

@ -1,11 +0,0 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Bacula Monitor
GenericName=Bacula Tray Monitor
Comment=Monitor your Bacula Backup server
Exec=/usr/bin/bacula-tray-monitor -c /etc/bacula/tray-monitor.conf
Icon=bacula-tray-monitor.xpm
Terminal=false
Type=Application
Categories=System;Application;Utility

View File

@ -0,0 +1,3 @@
USER=root
PROGRAM=/usr/sbin/bwxconsole
SESSION=true

View File

@ -4,7 +4,7 @@ Encoding=UTF-8
Name=Bacula WX Console
GenericName=Backup Management Console
Comment=Control your Bacula Server
Exec=/usr/sbin/wxconsole -c /etc/bacula/bwxconsole.conf
Exec=/usr/bin/bwxconsole -c /etc/bacula/bwxconsole.conf
Icon=wxwin16x16
Terminal=false
Type=Application

View File

@ -8,7 +8,7 @@
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
Name: bacula
Version: 5.0.2
Release: 3%{?dist}
Release: 4%{?dist}
# See LICENSE for details
License: GPLv2 with exceptions
Group: System Environment/Daemons
@ -25,7 +25,8 @@ Source9: bacula-sd.init
#Source10: http://download.sourceforge.net/bacula/bacula-gui-%{gui_version}.tar.gz
#Source11: bacula-web.apache
Source12: bacula-bat.desktop
Source13: bacula-traymonitor.desktop.consolehelper
Source13: bacula-traymonitor.console_apps
Source14: bacula-wxconsole.console_apps
Patch0: bacula-director-configuration.patch
Patch1: bacula-config.patch
#Patch2: bacula-wxconsole.patch
@ -581,18 +582,18 @@ install -m 644 -D bacula-sqlite/scripts/bacula.png %{buildroot}%{_datadir}/pixma
#install -m 644 -D bacula-sqlite/scripts/bgnome-console.pamd %{buildroot}%{_sysconfdir}/pam.d/bgnome-console
#install -m 644 -D bacula-sqlite/scripts/bgnome-console.console_apps %{buildroot}%{_sysconfdir}/security/console.apps/bgnome-console
install -m 644 -D bacula-sqlite/src/wx-console/wxwin16x16.xpm %{buildroot}%{_datadir}/pixmaps/wxwin16x16.xpm
install -m 644 -D bacula-sqlite/scripts/wxconsole.pamd %{buildroot}%{_sysconfdir}/pam.d/wxconsole
install -m 644 -D bacula-sqlite/scripts/wxconsole.desktop.consolehelper %{buildroot}%{_sysconfdir}/security/console.apps/wxconsole
install -m 644 -D bacula-sqlite/scripts/wxconsole.pamd %{buildroot}%{_sysconfdir}/pam.d/bwxconsole
install -m 644 -D %{SOURCE14} %{buildroot}%{_sysconfdir}/security/console.apps/bwxconsole
#bat.pamd is broken.
install -m 644 -D bacula-sqlite/scripts/bgnome-console.pamd %{buildroot}%{_sysconfdir}/pam.d/bat
install -m 644 -D bacula-sqlite/scripts/bat.desktop.consolehelper %{buildroot}%{_sysconfdir}/security/console.apps/bat
install -m 644 -D bacula-sqlite/scripts/bat.console_apps %{buildroot}%{_sysconfdir}/security/console.apps/bat
install -m 644 -D bacula-sqlite/src/tray-monitor/generic.xpm %{buildroot}%{_datadir}/pixmaps/bacula-tray-monitor.xpm
install -m 644 -D bacula-sqlite/src/qt-console/images/bat_icon.png %{buildroot}%{_datadir}/pixmaps/bat_icon.png
install -m 644 -D bacula-sqlite/scripts/bgnome-console.pamd %{buildroot}%{_sysconfdir}/pam.d/bacula-tray-monitor
install -m 644 %{SOURCE13} %{buildroot}%{_sysconfdir}/security/console.apps/bacula-tray-monitor
#ln -sf consolehelper %{buildroot}%{_bindir}/bgnome-console
ln -sf consolehelper %{buildroot}%{_bindir}/wxconsole
ln -sf consolehelper %{buildroot}%{_bindir}/bwxconsole
ln -sf consolehelper %{buildroot}%{_bindir}/bat
ln -sf consolehelper %{buildroot}%{_bindir}/bacula-tray-monitor
install -m 755 bacula-sqlite/src/qt-console/bat %{buildroot}%{_sbindir}
@ -862,10 +863,10 @@ fi
%files console-wxwidgets
%defattr(-,root,root,-)
%config %{_sysconfdir}/security/console.apps/wxconsole
%config %{_sysconfdir}/pam.d/wxconsole
%config %{_sysconfdir}/security/console.apps/bwxconsole
%config %{_sysconfdir}/pam.d/bwxconsole
%attr(640,root,bacula) %config(noreplace) %{_sysconfdir}/bacula/bwxconsole.conf
%{_bindir}/wxconsole
%{_bindir}/bwxconsole
%{_sbindir}/bwxconsole
%{_mandir}/man1/bacula-bwxconsole.1*
%{_datadir}/applications/fedora-bacula-wxconsole.desktop
@ -1021,6 +1022,10 @@ fi
%changelog
* Wed Jun 2 2010 Jan Görig <jgorig@redhat.com> 5.0.2-4
- initscripts improvements
- fixed consolehelper settings and menu entries
* Tue Jun 01 2010 Jon Ciesla <limb@jcomserv.net - 5.0.2-3
- Corrected ssl patch, court. jgorig.