. /etc/pbdc.conf
-php $BASE_DIR/pbdc.php $*
\ No newline at end of file
+php $BASE_DIR/bin/pbdc.php $*
\ No newline at end of file
. /etc/pbdc.conf
-php $BASE_DIR/pbdc-bacula.php $*
\ No newline at end of file
+php $BASE_DIR/bin/pbdc-bacula.php $*
\ No newline at end of file
<?php
-$BASE_LIB="../lib";
-$BASE_DATA="../db";
-$BACULA_USER="paulr";
+
+$BASE_LIB=$_SERVER["BASE_LIB"];
+$BASE_DATA=$_SERVER["BASE_DATA"];
+$BACULA_USER=$_SERVER["BACULA_USER"];
global $BASE_DATA, $BASE_LIB, $BACULA_USER, $argv;
<?php
-$BASE_LIB="../lib";
-$BASE_DATA="../db";
-$BACULA_USER="paulr";
+$BASE_LIB=$_SERVER["BASE_LIB"];
+$BASE_DATA=$_SERVER["BASE_DATA"];
+$BACULA_USER=$_SERVER["BACULA_USER"];
global $BASE_DATA, $BASE_LIB, $BACULA_USER;
--- /dev/null
+#!/bin/bash
+
+read -p "Base directory for installation [/opt/pbdc/]:" install_base
+read -p "Bacula User ID [bacula]:" user_id
+
+if [ "x$install_base" == "x" ]
+then
+ install_base="/opt/pdbc"
+fi
+
+if [ "x$user_id" == "x" ]
+then
+ user_id="bacula"
+fi
+
+mkdir -p $install_base/bin
+mkdir -p $install_base/lib
+mkdir -p $install_base/db
+
+export install_base user_id
+
+cat >> /etc/pbdc.conf << EOF
+BASE_DIR=$install_base
+BASE_LIB=$install_base/lib/
+BASE_DATA=$install_base/db/
+BACULA_USER="$user_id"
+
+export BACULA_USER BASE_DATA BASE_LIB BASE_DIR
+EOF
+
+cp -rp bin/* $install_base/bin
+cp -rp lib/* $install_base/lib
+chown -R $install_base
\ No newline at end of file