]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/solaris/bacula-fd.in
Make the solaris init scripts user/group aware
[bacula/bacula] / bacula / platforms / solaris / bacula-fd.in
index cd3bef1a37331e3ee8d0da31087fdecb8765a9eb..eeca38d537bf9b7421083e76ed0d9ed77f7c2a55 100755 (executable)
@@ -9,10 +9,21 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+FD_USER=@fd_user@
+FD_GROUP=@fd_group@
+FD_OPTIONS=''
+
 case "$1" in
     start)
+       if [ "${FD_USER}" != '' ]; then
+          FD_OPTIONS="${FD_OPTIONS} -u ${FD_USER}"
+       fi
+       if [ "${FD_GROUP}" != '' ]; then
+          FD_OPTIONS="${FD_OPTIONS} -g ${FD_GROUP}"
+       fi
+
        echo "Starting the Bacula File daemon: "
-       @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
+       @sbindir@/bacula-fd $2 ${FD_OPTIONS} -c @sysconfdir@/bacula-fd.conf
        ;;
     stop)
        echo "Stopping the Bacula File daemon: "