From c550d11bce1f62e89350c09f69eb272a3df851e2 Mon Sep 17 00:00:00 2001 From: Jan Görig Date: Jun 03 2010 11:47:07 +0000 Subject: fixes last commit --- diff --git a/bacula-bat.desktop b/bacula-bat.desktop index 3b450e7..d9caadc 100644 --- a/bacula-bat.desktop +++ b/bacula-bat.desktop @@ -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 diff --git a/bacula-bwxconsole.desktop b/bacula-bwxconsole.desktop index 00e4d5a..6c103de 100644 --- a/bacula-bwxconsole.desktop +++ b/bacula-bwxconsole.desktop @@ -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 diff --git a/bacula-dir.init b/bacula-dir.init index c77c521..ecb00a0 100644 --- a/bacula-dir.init +++ b/bacula-dir.init @@ -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 $? diff --git a/bacula-fd.init b/bacula-fd.init index 3374e6f..ca4a80d 100644 --- a/bacula-fd.init +++ b/bacula-fd.init @@ -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 $? diff --git a/bacula-sd.init b/bacula-sd.init index 14e3255..25221ad 100644 --- a/bacula-sd.init +++ b/bacula-sd.init @@ -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 $? diff --git a/bacula-traymonitor.console_apps b/bacula-traymonitor.console_apps new file mode 100644 index 0000000..45447b8 --- /dev/null +++ b/bacula-traymonitor.console_apps @@ -0,0 +1,3 @@ +USER=root +PROGRAM=/usr/sbin/bacula-tray-monitor +SESSION=true diff --git a/bacula-traymonitor.desktop b/bacula-traymonitor.desktop index 7ddb212..1e20abc 100644 --- a/bacula-traymonitor.desktop +++ b/bacula-traymonitor.desktop @@ -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 diff --git a/bacula-wxconsole.console_apps b/bacula-wxconsole.console_apps new file mode 100644 index 0000000..405795d --- /dev/null +++ b/bacula-wxconsole.console_apps @@ -0,0 +1,3 @@ +USER=root +PROGRAM=/usr/sbin/bwxconsole +SESSION=true \ No newline at end of file diff --git a/bacula-wxconsole.desktop b/bacula-wxconsole.desktop index 8cf7f11..186abcb 100644 --- a/bacula-wxconsole.desktop +++ b/bacula-wxconsole.desktop @@ -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