-
Notifications
You must be signed in to change notification settings - Fork 1
/
hermod.sh
55 lines (44 loc) · 1.37 KB
/
hermod.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
# ---------------------------------------------------------------------------
# This file is part of hermod.
#
# Copyright (c) 2019 ItsANameToo <[email protected]>
# Copyright (c) Brian Faust <[email protected]>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
# ---------------------------------------------------------------------------
# -------------------------
# Variables
# -------------------------
hermod=$(basename "$0")
hermod_dir="${HOME}/hermod"
hermod_log="${hermod_dir}/hermod.log"
# -------------------------
# Modules
# -------------------------
. "${hermod_dir}/modules/colors.sh"
. "${hermod_dir}/modules/errors.sh"
. "${hermod_dir}/modules/bootstrap.sh"
. "${hermod_dir}/modules/config.sh"
. "${hermod_dir}/modules/processes.sh"
. "${hermod_dir}/modules/notifications.sh"
. "${hermod_dir}/modules/monitor.sh"
. "${hermod_dir}/modules/snapshot.sh"
. "${hermod_dir}/modules/commands.sh"
. "${hermod_dir}/modules/install.sh"
. "${hermod_dir}/modules/args.sh"
# -------------------------
# Start
# -------------------------
main()
{
setup_environment
# Allow incorrect config when passing the config parameter
if [[ ! "$1" = "config" ]]; then
check_configuration
fi
parse_args "$@"
trap cleanup SIGINT SIGTERM SIGKILL
}
main "$@"