summaryrefslogtreecommitdiff
path: root/functions/conffile.sh
blob: 0cd8d2934613ff786627c685a4931c1ad11ea234 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# conffile.sh - handle configuration files

set -e

Read_conffile ()
{
	CONFFILE="${1}"

	# Reading configuration file
	if [ -f "${CONFFILE}" ]
	then
		if [ -r "${CONFFILE}" ]
		then
			. "${CONFFILE}"
		else
			echo "W: failed to read ${CONFFILE}"
		fi
	fi
}