initscripts improvements and fixed menu entries
This commit is contained in:
parent
d1fa04c4eb
commit
ddc0d55d7c
@ -4,7 +4,7 @@ Encoding=UTF-8
|
|||||||
Name=Bacula Bat Console
|
Name=Bacula Bat Console
|
||||||
GenericName=Backup Management Console
|
GenericName=Backup Management Console
|
||||||
Comment=Control your Bacula Server
|
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
|
Icon=bat_icon
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
@ -4,7 +4,7 @@ Encoding=UTF-8
|
|||||||
Name=Bacula WX Console
|
Name=Bacula WX Console
|
||||||
GenericName=Backup Management Console
|
GenericName=Backup Management Console
|
||||||
Comment=Control your Bacula Server
|
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
|
Icon=wxwin16x16
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
@ -30,7 +30,7 @@ checkconf() {
|
|||||||
# If yes, refuse to start, the user has never touched the config.
|
# If yes, refuse to start, the user has never touched the config.
|
||||||
grep -q '^[^#].*_PASSWORD@@' $CONFIG
|
grep -q '^[^#].*_PASSWORD@@' $CONFIG
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo -n "Error: Not been configured"
|
echo -n "Error: Program has not been configured"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@ -50,7 +50,7 @@ checkdatabase() {
|
|||||||
# Check if mysqld is running
|
# Check if mysqld is running
|
||||||
service mysqld status > /dev/null 2>&1
|
service mysqld status > /dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -n "Error: MySQL not running"
|
echo -n "Error: MySQL is not running"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@ -60,7 +60,7 @@ checkdatabase() {
|
|||||||
# Check if postgresql is running
|
# Check if postgresql is running
|
||||||
service postgresql status > /dev/null 2>&1
|
service postgresql status > /dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -n "Error: PostgreSQL not running"
|
echo -n "Error: PostgreSQL is not running"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@ -76,6 +76,8 @@ checkdatabase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ "$EUID" != "0" ] && exit 4
|
||||||
|
|
||||||
echo -n "Starting $prog: "
|
echo -n "Starting $prog: "
|
||||||
checkconf
|
checkconf
|
||||||
# Removed for now, as the db might not be on localhost
|
# Removed for now, as the db might not be on localhost
|
||||||
@ -88,6 +90,8 @@ start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
[ "$EUID" != "0" ] && exit 4
|
||||||
|
|
||||||
echo -n "Shutting down $prog: "
|
echo -n "Shutting down $prog: "
|
||||||
killproc $prog
|
killproc $prog
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
@ -106,23 +110,22 @@ case "$1" in
|
|||||||
status)
|
status)
|
||||||
status $prog
|
status $prog
|
||||||
;;
|
;;
|
||||||
restart)
|
restart|force-reload)
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
RETVAL=$?
|
|
||||||
;;
|
;;
|
||||||
reload)
|
reload)
|
||||||
;;
|
;;
|
||||||
condrestart)
|
condrestart|try-restart)
|
||||||
if [ -f /var/lock/subsys/$prog ]; then
|
if [ -f /var/lock/subsys/$prog ]; then
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
RETVAL=$?
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $prog {start|stop|status|reload|restart}"
|
echo "Usage: $prog {start|stop|restart|condrestart|try-restart|reload|force-reload|status|usage}"
|
||||||
exit 1
|
[ "$1" = "usage" ] && exit 0
|
||||||
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit $?
|
exit $?
|
||||||
|
@ -30,7 +30,7 @@ checkconf() {
|
|||||||
# If yes, refuse to start, the user has never touched the config.
|
# If yes, refuse to start, the user has never touched the config.
|
||||||
grep -q '_PASSWORD@@' $CONFIG
|
grep -q '_PASSWORD@@' $CONFIG
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo -n "Error: Not been configured"
|
echo -n "Error: Program has not been configured"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@ -39,6 +39,8 @@ checkconf() {
|
|||||||
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ "$EUID" != "0" ] && exit 4
|
||||||
|
|
||||||
echo -n "Starting $prog: "
|
echo -n "Starting $prog: "
|
||||||
checkconf
|
checkconf
|
||||||
daemon $prog $OPTS
|
daemon $prog $OPTS
|
||||||
@ -49,6 +51,8 @@ start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
[ "$EUID" != "0" ] && exit 4
|
||||||
|
|
||||||
echo -n "Shutting down $prog: "
|
echo -n "Shutting down $prog: "
|
||||||
killproc $prog
|
killproc $prog
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
@ -67,23 +71,22 @@ case "$1" in
|
|||||||
status)
|
status)
|
||||||
status $prog
|
status $prog
|
||||||
;;
|
;;
|
||||||
restart)
|
restart|force-reload)
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
RETVAL=$?
|
|
||||||
;;
|
;;
|
||||||
reload)
|
reload)
|
||||||
;;
|
;;
|
||||||
condrestart)
|
condrestart|try-restart)
|
||||||
if [ -f /var/lock/subsys/$prog ]; then
|
if [ -f /var/lock/subsys/$prog ]; then
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
RETVAL=$?
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $prog {start|stop|status|reload|restart}"
|
echo "Usage: $prog {start|stop|restart|condrestart|try-restart|reload|force-reload|status|usage}"
|
||||||
exit 1
|
[ "$1" = "usage" ] && exit 0
|
||||||
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit $?
|
exit $?
|
||||||
|
@ -29,7 +29,7 @@ checkconf() {
|
|||||||
# If yes, refuse to start, the user has never touched the config.
|
# If yes, refuse to start, the user has never touched the config.
|
||||||
grep -q '^[^#].*_PASSWORD@@' $CONFIG
|
grep -q '^[^#].*_PASSWORD@@' $CONFIG
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo -n "Error: Not been configured"
|
echo -n "Error: Program has not been configured"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@ -49,7 +49,7 @@ checkdatabase() {
|
|||||||
# Check if mysqld is running
|
# Check if mysqld is running
|
||||||
service mysqld status > /dev/null 2>&1
|
service mysqld status > /dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -n "Error: MySQL not running"
|
echo -n "Error: MySQL is not running"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@ -59,7 +59,7 @@ checkdatabase() {
|
|||||||
# Check if postgresql is running
|
# Check if postgresql is running
|
||||||
service postgresql status > /dev/null 2>&1
|
service postgresql status > /dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -n "Error: PostgreSQL not running"
|
echo -n "Error: PostgreSQL is not running"
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@ -75,6 +75,8 @@ checkdatabase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
[ "$EUID" != "0" ] && exit 4
|
||||||
|
|
||||||
echo -n "Starting $prog: "
|
echo -n "Starting $prog: "
|
||||||
checkconf
|
checkconf
|
||||||
# Disabled, the DB does not necessarily run on the same machine
|
# Disabled, the DB does not necessarily run on the same machine
|
||||||
@ -87,6 +89,8 @@ start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
[ "$EUID" != "0" ] && exit 4
|
||||||
|
|
||||||
echo -n "Shutting down $prog: "
|
echo -n "Shutting down $prog: "
|
||||||
killproc $prog
|
killproc $prog
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
@ -105,23 +109,22 @@ case "$1" in
|
|||||||
status)
|
status)
|
||||||
status $prog
|
status $prog
|
||||||
;;
|
;;
|
||||||
restart)
|
restart|force-reload)
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
RETVAL=$?
|
|
||||||
;;
|
;;
|
||||||
reload)
|
reload)
|
||||||
;;
|
;;
|
||||||
condrestart)
|
condrestart|try-restart)
|
||||||
if [ -f /var/lock/subsys/$prog ]; then
|
if [ -f /var/lock/subsys/$prog ]; then
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
RETVAL=$?
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $prog {start|stop|status|reload|restart}"
|
echo "Usage: $prog {start|stop|restart|condrestart|try-restart|reload|force-reload|status|usage}"
|
||||||
exit 1
|
[ "$1" = "usage" ] && exit 0
|
||||||
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit $?
|
exit $?
|
||||||
|
3
bacula-traymonitor.console_apps
Normal file
3
bacula-traymonitor.console_apps
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
USER=root
|
||||||
|
PROGRAM=/usr/sbin/bacula-tray-monitor
|
||||||
|
SESSION=true
|
@ -4,7 +4,7 @@ Encoding=UTF-8
|
|||||||
Name=Bacula Monitor
|
Name=Bacula Monitor
|
||||||
GenericName=Bacula Tray Monitor
|
GenericName=Bacula Tray Monitor
|
||||||
Comment=Monitor your Bacula Backup server
|
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
|
Icon=bacula-tray-monitor.xpm
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
@ -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
|
|
3
bacula-wxconsole.console_apps
Normal file
3
bacula-wxconsole.console_apps
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
USER=root
|
||||||
|
PROGRAM=/usr/sbin/bwxconsole
|
||||||
|
SESSION=true
|
@ -4,7 +4,7 @@ Encoding=UTF-8
|
|||||||
Name=Bacula WX Console
|
Name=Bacula WX Console
|
||||||
GenericName=Backup Management Console
|
GenericName=Backup Management Console
|
||||||
Comment=Control your Bacula Server
|
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
|
Icon=wxwin16x16
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
23
bacula.spec
23
bacula.spec
@ -8,7 +8,7 @@
|
|||||||
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
|
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
|
||||||
Name: bacula
|
Name: bacula
|
||||||
Version: 5.0.2
|
Version: 5.0.2
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
# See LICENSE for details
|
# See LICENSE for details
|
||||||
License: GPLv2 with exceptions
|
License: GPLv2 with exceptions
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -25,7 +25,8 @@ Source9: bacula-sd.init
|
|||||||
#Source10: http://download.sourceforge.net/bacula/bacula-gui-%{gui_version}.tar.gz
|
#Source10: http://download.sourceforge.net/bacula/bacula-gui-%{gui_version}.tar.gz
|
||||||
#Source11: bacula-web.apache
|
#Source11: bacula-web.apache
|
||||||
Source12: bacula-bat.desktop
|
Source12: bacula-bat.desktop
|
||||||
Source13: bacula-traymonitor.desktop.consolehelper
|
Source13: bacula-traymonitor.console_apps
|
||||||
|
Source14: bacula-wxconsole.console_apps
|
||||||
Patch0: bacula-director-configuration.patch
|
Patch0: bacula-director-configuration.patch
|
||||||
Patch1: bacula-config.patch
|
Patch1: bacula-config.patch
|
||||||
#Patch2: bacula-wxconsole.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.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/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/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.pamd %{buildroot}%{_sysconfdir}/pam.d/bwxconsole
|
||||||
install -m 644 -D bacula-sqlite/scripts/wxconsole.desktop.consolehelper %{buildroot}%{_sysconfdir}/security/console.apps/wxconsole
|
install -m 644 -D %{SOURCE14} %{buildroot}%{_sysconfdir}/security/console.apps/bwxconsole
|
||||||
#bat.pamd is broken.
|
#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/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/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/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 -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
|
install -m 644 %{SOURCE13} %{buildroot}%{_sysconfdir}/security/console.apps/bacula-tray-monitor
|
||||||
|
|
||||||
#ln -sf consolehelper %{buildroot}%{_bindir}/bgnome-console
|
#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}/bat
|
||||||
ln -sf consolehelper %{buildroot}%{_bindir}/bacula-tray-monitor
|
ln -sf consolehelper %{buildroot}%{_bindir}/bacula-tray-monitor
|
||||||
install -m 755 bacula-sqlite/src/qt-console/bat %{buildroot}%{_sbindir}
|
install -m 755 bacula-sqlite/src/qt-console/bat %{buildroot}%{_sbindir}
|
||||||
@ -862,10 +863,10 @@ fi
|
|||||||
|
|
||||||
%files console-wxwidgets
|
%files console-wxwidgets
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%config %{_sysconfdir}/security/console.apps/wxconsole
|
%config %{_sysconfdir}/security/console.apps/bwxconsole
|
||||||
%config %{_sysconfdir}/pam.d/wxconsole
|
%config %{_sysconfdir}/pam.d/bwxconsole
|
||||||
%attr(640,root,bacula) %config(noreplace) %{_sysconfdir}/bacula/bwxconsole.conf
|
%attr(640,root,bacula) %config(noreplace) %{_sysconfdir}/bacula/bwxconsole.conf
|
||||||
%{_bindir}/wxconsole
|
%{_bindir}/bwxconsole
|
||||||
%{_sbindir}/bwxconsole
|
%{_sbindir}/bwxconsole
|
||||||
%{_mandir}/man1/bacula-bwxconsole.1*
|
%{_mandir}/man1/bacula-bwxconsole.1*
|
||||||
%{_datadir}/applications/fedora-bacula-wxconsole.desktop
|
%{_datadir}/applications/fedora-bacula-wxconsole.desktop
|
||||||
@ -1021,6 +1022,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* Tue Jun 01 2010 Jon Ciesla <limb@jcomserv.net - 5.0.2-3
|
||||||
- Corrected ssl patch, court. jgorig.
|
- Corrected ssl patch, court. jgorig.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user