# Load Debconf
. /usr/share/debconf/confmodule
-# Load CARNet Tools
+# Load CARNET Tools
. /usr/share/carnet-tools/functions.sh
PKG="apache2-cn"
# tag_conf()
#
-# Add CARNet package info lines to config's header.
+# Add CARNET package info lines to config's header.
#
tag_conf () {
local conf_file
if [ -e "$conf_file" ]; then
cat >> $conf_file <<EOF
-## Begin - Generated by CARNet package apache2-cn
+## Begin - Generated by CARNET package apache2-cn
#
# REMOVE this whole block if you DON'T WANT apache2-cn
# to edit or undo your changes to this configuration file.
#
-## End - Generated by CARNet package apache2-cn
+## End - Generated by CARNET package apache2-cn
EOF
fi
}
# chk_conf_tag ()
#
-# Check if configuration file has CARNet package info lines.
+# Check if configuration file has CARNET package info lines.
# return: $RET => 0 - tagged
# 1 - not tagged or file does not exists
# 2 - file exists, but it is not tagged
RET=1
if [ -f "$conf_file" ]; then
- if egrep -q "^## Begin - Generated by CARNet package apache2-cn$" "$conf_file"; then
+ if egrep -q "^## Begin - Generated by CARNET package apache2-cn$" "$conf_file"; then
RET=0
else
RET=2
conf="$CONFDIR/conf-available/$2.conf"
if [ ! -e "$conf" ]; then
- cp_echo "CN: Generating CARNet specific configuration."
+ cp_echo "CN: Generating CARNET specific configuration."
cp "$conftmpl" "$conf"
else
cp_echo "CN: $conf already exists, left untouched." 1>&2
fi
- cp_echo "CN: Enabling CARNet specific configuration."
+ cp_echo "CN: Enabling CARNET specific configuration."
a2enconf -m -q "$2"
need_restart=1
}
out=$(mktemp $vhostdir/$venabled.XXXXXX)
temp_files="${temp_files} ${out}"
- # CARNet header.
+ # CARNET header.
tag_conf "$out"
if [ "$add_namevirthost" ]; then
fi
-# Install CARNet specific configuration file.
+# Install CARNET specific configuration file.
#
install_conf carnet 000-carnet