fuel-agent/debian/fuel-agent.postinst

31 lines
481 B
Bash

#!/bin/sh
set -e
CONFIG_FILE=/etc/fuel-agent/fuel-agent.conf
copy_config_file() {
if [ -e "${CONFIG_FILE}" ]; then
return 0
fi
if [ -e "${CONFIG_FILE}.sample" ]; then
cp "${CONFIG_FILE}.sample" "${CONFIG_FILE}"
fi
}
case $1 in
configure)
copy_config_file
;;
abort-upgrade|abort-remove|abort-deconfigure)
exit 0
;;
*)
echo "postinst called with unknown argument '$1'" >&2
exit 1
;;
esac