---
name: bacula-client
version: 5.2.12
origin: sysutils/bacula-client
comment: Network backup solution (client)
arch: freebsd:9:x86:64
www: http://www.bacula.org/
maintainer: dan@langille.org
prefix: /usr/local
licenselogic: single
flatsize: 832912
desc: |
  Bacula is a set of computer programs that permit you (or the system
  administrator) to manage backup, recovery, and verification of
  computer data across a network of computers of different kinds.
  In technical terms, it is a network Client/Server based backup program.
  Bacula is relatively easy to use and efficient, while offering many
  advanced storage management features that make it easy to find and
  recover lost or damaged files. Due to its modular design, Bacula is
  scalable from small single computer systems to systems consisting of
  hundreds of computers located over a large network.

  WWW: http://www.bacula.org/
deps:
  gettext: {origin: devel/gettext, version: 0.18.1.1_1}
  libiconv: {origin: converters/libiconv, version: 1.14_1}
categories: [sysutils]
users: [bacula]
groups: [bacula]
options: {NLS: on, OPENSSL: on}
files:
  /usr/local/etc/bacula-fd.conf.sample: 65407d2badf16093c0e4768bd4285edbc704627c51875552168443db2046042b
  /usr/local/etc/bconsole.conf.sample: 350d6f485b2405b057b9ebaff021673d3e1223a819568da0fb302f352de061d6
  /usr/local/etc/rc.d/bacula-fd: bdd7fe3b1dac31ec90adbe83593a83e4280ab41065b8edfc1ecb30532d862746
  /usr/local/lib/bpipe-fd.so: cad19f7313418f6eb9a74c1983ce28deab178e1fd288133103f96c7698bf9cc1
  /usr/local/lib/libbac.la: 19d63575b629e7173a2171de6194f2bdf3128e927e390cbcd7f4b39d096268d9
  /usr/local/lib/libbac.so: '-'
  /usr/local/lib/libbac.so.5: d59b55b113e4ae90737fbe2ac1f1f033b242faec6b4f0e0d6fd0fb74d6908579
  /usr/local/lib/libbaccfg.la: fb5cce832490931b65b74c1e6832b7ce14b5ad639dad9171e9dca2515a968f9d
  /usr/local/lib/libbaccfg.so: '-'
  /usr/local/lib/libbaccfg.so.5: 65a8de3c6fcab6c259f6529bd8242b24f2e7a51ba62eb7e1fb86dddd47008958
  /usr/local/lib/libbacfind.la: a77c478cc466ab939d67897aba3dbcefc7f9f24ba0059ce0bb574c9df96b7aad
  /usr/local/lib/libbacfind.so: '-'
  /usr/local/lib/libbacfind.so.5: b9ba7c36d7833b0f313b1df4a33d4fc265aac4f188fa8ce6960f12199f489d6e
  /usr/local/lib/libbacpy.la: abdb9694c1f5701942af1bd91454d5ffa27a4d809195e3f197d07811f7647497
  /usr/local/lib/libbacpy.so: '-'
  /usr/local/lib/libbacpy.so.5: 69b78487fba87948cc282dfa973d34e05c35c84ead2fee6b6b44c99dfc257e32
  /usr/local/man/man8/bacula-fd.8.gz: 1e53fa15f8b84ae929f80e6d02bc28c3c6f9816df44ae6d5c54167b9bf3979cb
  /usr/local/man/man8/bconsole.8.gz: 12098dbfa689d238bb3e5ba5f8158b075757f2a3d2fe3d19437b03a4f5b4b5cb
  /usr/local/sbin/bacula-fd: 65fb89f3ac401368f163d5ca851f44d9712b1876c4633bc5295588e76fbc838b
  /usr/local/sbin/bconsole: a6445a5223a07b0c01a366ac5a8fad9a102c2c992d6f5a76a05beb22eeb2c9ca
directories:
  /var/db/bacula/: y
  /usr/local/share/bacula/: y
scripts:
  post-install: |
    echo "===> Creating users and/or groups."
    if ! /usr/sbin/pw groupshow bacula >/dev/null 2>&1; then  echo "Creating group 'bacula' with gid '910'.";  /usr/sbin/pw groupadd bacula -g 910; else echo "Using existing group 'bacula'."; fi
    if ! /usr/sbin/pw usershow bacula >/dev/null 2>&1; then  echo "Creating user 'bacula' with uid '910'.";  /usr/sbin/pw useradd bacula -u 910 -g 910  -c "Bacula Daemon" -d /var/db/bacula -s /usr/sbin/nologin;  else echo "Using existing user 'bacula'."; fi
    install -d -g 910 -o 910 /var/db/bacula
    mkdir -p /var/db/bacula
    /sbin/ldconfig -m /usr/local/lib
    cd /usr/local
  pre-deinstall: |
    /usr/bin/killall bacula-fd > /dev/null 2>&1 || true
    /sbin/ldconfig -R
    if /usr/sbin/pw usershow bacula >/dev/null 2>&1; then  echo "==> You should manually remove the \"bacula\" user. "; fi
    cd /usr/local
  post-deinstall: |
    cd /usr/local
  install: |
    #!/bin/sh

    PATH=/bin:/usr/bin:/usr/sbin

    # Always add lines in /etc/services
    grep -q "bacula-dir" /etc/services
    if [ "$?" != "0" ]; then
        echo "# Bacula port start
    bacula-dir      9101/tcp   #Bacula director daemon
    bacula-fd       9102/tcp   #Bacula file daemon
    bacula-sd       9103/tcp   #Bacula storage daemon
    # Bacule port end" >> /etc/services
    fi
  deinstall: "#!/bin/sh\n\nPATH=/bin:/usr/bin:/usr/sbin\n\n# Note how to delete UID/GID\nUSER=bacula\nGROUP=bacula\nUID=910\nGID=910\nBACULA_DIR=/var/db/bacula\n\nTMPFILE=/tmp/services-$RANDOM-$$\n\ncase
    \"$2\" in\n\"DEINSTALL\")\n\t# Delete entries in /etc/services\n        sed -e
    '/# Bacula port start/,/# Bacule port end/{' \\\n            -e 'd' \\\n            -e
    '}' /etc/services > $TMPFILE\n        mv -f $TMPFILE /etc/services\n\n\tif [ -d
    ${BACULA_DIR} ]; then\n\t    rmdir ${BACULA_DIR};\n\tfi\n\tif [ -d ${BACULA_DIR}
    ]; then\n\t    echo \"Check if ${BACULA_DIR} is empty and delete it to permanently
    remove the bacula port.\"\n\tfi\n\n\tif pw groupshow \"${USER}\" 2>/dev/null 1>&2;
    then\n\t    echo \"To delete Bacula group permanently, use 'pw groupdel ${GROUP}'\"\n\tfi\n
    \       ;;\nesac\n"
message: "################################################################################\n\nNOTE:\nSample
  files are installed in /usr/local/etc:\nbconsole.conf.sample, bacula-barcodes.sample,
  bacula-fd.conf.sample\n\n  Please read this file:\n\n\t/usr/local/share/doc/bacula/ReleaseNotes\n\n
  \ as installed by docs port for the upgrade procedure.\n\nRead the ReleaseNotes
  for further information.\n\n################################################################################\n"
