aboutsummaryrefslogtreecommitdiff
path: root/ops/multiconfig
blob: cee4d788880618fc4c4e477217f281ccb418fbac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# vim:ft=sh:noexpandtab
# Multiconfig system configuration

# TODO setup cron
# TODO configure sending email account
# TODO configure keys
# TODO setup root ssh key to access git repo

MULTICONFIG_SCRIPT="./scripts/multiconfig.sh"
MULTICONFIG_CRON_SCRIPT="./scripts/multiconfig-cron.sh"

multiconfig_check() {
	ops_set_current multiconfig

	if do_diff "$MULTICONFIG_SCRIPT" "/usr/local/bin/multiconfig.sh" \
			"Multiconfig script changes"; then
		ops_require script
	fi

	if do_diff "$MULTICONFIG_CRON_SCRIPT" "/etc/cron.daily/multiconfig" \
			"Multiconfig cron script changes"; then
		ops_require cron
	fi

	ops_required_any "Multiconfig" # return 1 fall trough
}

multiconfig_prepare() {
	# We have nothing to do for prepare
	true
}

multiconfig_apply() {
	ops_set_current multiconfig

}

multiconfig_clean() {
	# We have nothing to do for clean
	true
}