#!/bin/bash # # Helper script to create a default .conf file from the corresponding .conf.distrib. # usage: avs_initial_conf.sh # [ $# -eq 1 ] || exit 1 component_name=$1 etc_dir=/opt/AVS/etc conf_distrib=$etc_dir/AVS_${component_name}.conf.distrib conf=$etc_dir/AVS_${component_name}.conf [ -f "$conf_distrib" ] || exit 1 [ -f "$conf" ] && exit 0 cp "$conf_distrib" "$conf" chown ctc:ctc "$conf" chmod g+w "$conf"