Skip to content

Commit b34b0f6

Browse files
committed
changed folder structure & sperated borg into core, server & conf script
1 parent b78bfc4 commit b34b0f6

4 files changed

Lines changed: 22 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# server spezific data
2-
**/server/**
2+
**/conf/**

src/borg/core.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# === vars ===
4+
BORG_WORKING_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # location env
5+
borg_conf_file="$BORG_WORKING_DIR/conf/conf.sh"
6+
7+
# === main ===
8+
# loading borg configuration
9+
if ! source "$borg_conf_file"; then
10+
echo "failed to load configuration *$borg_conf_file*; abort"
11+
exit 1
12+
fi
13+
14+
# loading server script
15+
source "$BORG_WORKING_DIR/server.sh"

src/borg/server.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
# === vars ===
4+
[[ -v BORG_RSH && -f "$SSH_KEYFILE" ]] && export BORG_RSH

src/packages/core.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+

0 commit comments

Comments
 (0)