Project

General

Profile

Download (822 Bytes) Statistics
| Branch: | Tag: | Revision:
#!/bin/sh
# preinst script for smart-proxy
#
# see: dh_installdeb(1)

set -e

USERNAME="foreman-proxy"
GROUPNAME="foreman-proxy"
FOREMAN_HOME="/usr/share/foreman-proxy"
CONFIGDIR="/etc/foreman-proxy"

case "$1" in
install)
;;
upgrade)
if [ ! -L $FOREMAN_HOME/config ]; then
# Update /etc to handle changes in links (it was a single file, now it's the whole dir)
cp -Lr $FOREMAN_HOME/config/* $CONFIGDIR/ || true # copying symlinks onto themselves counts as a fail
rm -rf $FOREMAN_HOME/config
ln -snf $CONFIGDIR $FOREMAN_HOME/config
fi
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 0
;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
(15-15/17)