]> 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 9544f4918d823ba2324b98fbf8b7724d1e8397a3..c547697066ef80d523ae0c245113e744e1808637 100755 (executable)
@@ -4,15 +4,26 @@
 #             the bacula Storage daemon.
 #
 # chkconfig: 2345 90 9
-# description: It comes by night and sucks the vital essence from your computers.
+# description: The Leading Open Source Backup Solution.
 #
 #  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: "