From e1c55a9c687ad90287787588551a8cbb5322d251 Mon Sep 17 00:00:00 2001 From: Raine Date: Wed, 18 Oct 2023 20:49:57 +0200 Subject: [PATCH] refactor: system skeleton instead of common files --- .gitmodules | 3 --- secrets | 1 - {common/cron => skel/etc/cron.d}/restic.crontab | 0 common/ssh_config => skel/etc/ssh/ssh_config.d/ixvd.conf | 0 {common => skel/opt/ixvd}/ntfy.sh | 0 {common => skel/opt}/restic/backup.sh | 2 +- {common => skel/opt}/restic/forget.sh | 2 +- {common => skel/opt}/restic/prune.sh | 2 +- 8 files changed, 3 insertions(+), 7 deletions(-) delete mode 160000 secrets rename {common/cron => skel/etc/cron.d}/restic.crontab (100%) rename common/ssh_config => skel/etc/ssh/ssh_config.d/ixvd.conf (100%) rename {common => skel/opt/ixvd}/ntfy.sh (100%) rename {common => skel/opt}/restic/backup.sh (74%) rename {common => skel/opt}/restic/forget.sh (79%) rename {common => skel/opt}/restic/prune.sh (72%) diff --git a/.gitmodules b/.gitmodules index 723209c..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "secrets"] - path = secrets - url = git@git.ixvd.net:ixvd/secrets.git diff --git a/secrets b/secrets deleted file mode 160000 index 9b3a0e1..0000000 --- a/secrets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9b3a0e179a13a79ba534de92898199821cf911b5 diff --git a/common/cron/restic.crontab b/skel/etc/cron.d/restic.crontab similarity index 100% rename from common/cron/restic.crontab rename to skel/etc/cron.d/restic.crontab diff --git a/common/ssh_config b/skel/etc/ssh/ssh_config.d/ixvd.conf similarity index 100% rename from common/ssh_config rename to skel/etc/ssh/ssh_config.d/ixvd.conf diff --git a/common/ntfy.sh b/skel/opt/ixvd/ntfy.sh similarity index 100% rename from common/ntfy.sh rename to skel/opt/ixvd/ntfy.sh diff --git a/common/restic/backup.sh b/skel/opt/restic/backup.sh similarity index 74% rename from common/restic/backup.sh rename to skel/opt/restic/backup.sh index aebb9de..c6a4684 100644 --- a/common/restic/backup.sh +++ b/skel/opt/restic/backup.sh @@ -1,7 +1,7 @@ #!/bin/sh ntfy() { - sh /neb/common/ntfy.sh -s "/neb/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" + sh /opt/ixvd/ntfy.sh -s "/neb/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" } ntfy -m "performing backup..." diff --git a/common/restic/forget.sh b/skel/opt/restic/forget.sh similarity index 79% rename from common/restic/forget.sh rename to skel/opt/restic/forget.sh index 5437567..c3a8cb9 100644 --- a/common/restic/forget.sh +++ b/skel/opt/restic/forget.sh @@ -1,7 +1,7 @@ #!/bin/sh ntfy() { - sh /neb/common/ntfy.sh -s "/neb/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" + sh /opt/ixvd/ntfy.sh -s "/neb/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" } ntfy -m "forgetting old backups..." diff --git a/common/restic/prune.sh b/skel/opt/restic/prune.sh similarity index 72% rename from common/restic/prune.sh rename to skel/opt/restic/prune.sh index 9fe276c..2c3ecaa 100644 --- a/common/restic/prune.sh +++ b/skel/opt/restic/prune.sh @@ -1,7 +1,7 @@ #!/bin/sh ntfy() { - sh /neb/common/ntfy.sh -s "/neb/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" + sh /opt/ixvd/ntfy.sh -s "/neb/secrets/ntfy/ixvd-backups" -u "https://push.ixvd.net/ixvd-backups" "$@" } ntfy -m "pruning old backups..."