22 lines
551 B
Plaintext
22 lines
551 B
Plaintext
# SHARED FUNCTIONS AND COMMANDS
|
|
|
|
# Test if config.cfg exists and set needed variables
|
|
if [ ! -e "$CURDIR"/config.cfg ]; then echo "Missing config.cfg file. Edit and rename config.cfg.sample"; exit 1; fi
|
|
source "$CURDIR"/config.cfg
|
|
|
|
# Create temp settings file
|
|
if [ ! -e "$TMP" ]; then
|
|
touch "$TMP"
|
|
fi
|
|
source "$TMP"
|
|
|
|
# WRITE TMP
|
|
function wtmp {
|
|
> $TMP
|
|
echo "var_mailqueue_runs=$var_mailqueue_runs" >> $TMP
|
|
echo "var_conn=$var_conn" >> $TMP
|
|
echo "var_ip4=$var_ip4" >> $TMP
|
|
echo "var_ip6=$var_ip6" >> $TMP
|
|
echo "var_vpn=$var_vpn" >> $TMP
|
|
}
|