#!/bin/sh
# version 0.7

. installink.sh

. ./!vda_ver

STATIC=/usr/app/$NAME$VER
PERBOX=/var/app/$NAME$VER

echo "*** Installing per-host files (config,data etc)"
echo
echo "This will install symlinks to PER BOX $NAME$VER files"
echo "Note: this will crush any existing file in the way!"
echo -n "Press <Enter> to continue or Ctrl-C to exit: "; read junk

# I expect that this link exists: $STATIC/var -> $PERBOX

# actually create var part
mkdir -p $PERBOX
#mkdir -p $PERBOX/etc
#mkdir -p $PERBOX/log
#mkdir -p $PERBOX/run

# populate it
cp -r                   $STATIC/var_template/*  $PERBOX

# symlink config
link_samename           /etc                    "$STATIC/var/etc/*"

# symlink usr part - handy for navigation
link                    $PERBOX/usr             $STATIC
