aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-04-07 10:04:38 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-04-07 10:04:38 +0200
commitec3f6b176c5bce1a2c1b690563b70897c48c62e5 (patch)
treeb5820ea907755979e8dd430fa0ab048874695734
parent42580a1b4882c2dca38ff5f1b6156a22bf22c051 (diff)
add config file
-rwxr-xr-xinstall1
-rwxr-xr-xspawnctl4
-rw-r--r--spawnctl.conf4
3 files changed, 6 insertions, 3 deletions
diff --git a/install b/install
index 1299da5..652c14d 100755
--- a/install
+++ b/install
@@ -1,6 +1,7 @@
#!/bin/sh
install spawnctl /usr/local/bin/
+install spawnctl.conf /etc/spawnctl.conf
install spawnctl-port-forward.service /etc/systemd/system/
chmod +x /usr/local/bin/spawnctl
diff --git a/spawnctl b/spawnctl
index 441073a..20dad8f 100755
--- a/spawnctl
+++ b/spawnctl
@@ -1,8 +1,6 @@
#!/bin/sh
-export BACKUP_DIR="YOUR BACKUP DIRECTORY"
-export IMAGE_DIR="$HOME/.cache/images"
-export MACHINE_DIR='/var/lib/machines'
+source /etc/spawnctl.conf
mkdir -p "$IMAGE_DIR"
mkdir -p "$BACKUP_DIR"
diff --git a/spawnctl.conf b/spawnctl.conf
new file mode 100644
index 0000000..7f3c18f
--- /dev/null
+++ b/spawnctl.conf
@@ -0,0 +1,4 @@
+#!/bin/sh
+export BACKUP_DIR="YOUR BACKUP DIRECTORY"
+export IMAGE_DIR="$HOME/.cache/images"
+export MACHINE_DIR='/var/lib/machines'