]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/platforms/solaris/bacula-sd.in
Make the solaris init scripts user/group aware
[bacula/bacula] / bacula / platforms / solaris / bacula-sd.in
index 6a0adb80a96e3696f927e03f7dd1d04b17e79e2f..c547697066ef80d523ae0c245113e744e1808637 100755 (executable)
@@ -9,10 +9,21 @@
 #  For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
 #
 
+SD_USER=@sd_user@
+SD_GROUP=@sd_group@
+SD_OPTIONS=''
+
 case "$1" in
     start)
+       if [ "${SD_USER}" != '' ]; then
+          SD_OPTIONS="${SD_OPTIONS} -u ${SD_USER}"
+       fi
+       if [ "${SD_GROUP}" != '' ]; then
+          SD_OPTIONS="${SD_OPTIONS} -g ${SD_GROUP}"
+       fi
+
        echo "Starting the Bacula Storage daemon: "
-       @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf
+       @sbindir@/bacula-sd $2 ${SD_OPTIONS} -c @sysconfdir@/bacula-sd.conf
        ;;
     stop)
        echo "Stopping the Bacula Storage daemon: "