Compare commits
No commits in common. "09ec143d6888e8749f26617ab3c40ab86b20cb21" and "be9750131a1ef75036e3e53bfa9071b6108fe0ac" have entirely different histories.
09ec143d68
...
be9750131a
3 changed files with 3 additions and 23 deletions
|
@ -14,7 +14,7 @@ function backupAction -V dir
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l deployScript (getDeploymentScript)
|
set -l deployScript (getDeploymentScript)
|
||||||
initBackupConfig --action backup
|
initConfig --action backup
|
||||||
|
|
||||||
runHook backupSoftware || begin
|
runHook backupSoftware || begin
|
||||||
echo "Backing up software..."
|
echo "Backing up software..."
|
||||||
|
|
|
@ -8,7 +8,6 @@ function runSetup
|
||||||
|
|
||||||
function setupAction -V projectRoot -V PROJECT_CLONE_ROOT
|
function setupAction -V projectRoot -V PROJECT_CLONE_ROOT
|
||||||
source "$dir/../../lib/hooks.fish"
|
source "$dir/../../lib/hooks.fish"
|
||||||
source "$dir/../../lib/restoration.fish"
|
|
||||||
source "$dir/../../lib/settings.fish"
|
source "$dir/../../lib/settings.fish"
|
||||||
set -l mountDir (getOSConfig partition.rootDir)
|
set -l mountDir (getOSConfig partition.rootDir)
|
||||||
set -l script (mktemp)
|
set -l script (mktemp)
|
||||||
|
@ -40,14 +39,6 @@ function runSetup
|
||||||
"$argv"
|
"$argv"
|
||||||
end
|
end
|
||||||
|
|
||||||
initBackupConfig --action restore
|
|
||||||
|
|
||||||
if [ -n "$VALHALLA_BACKUP_SERVER_KEY" ]
|
|
||||||
set -l knownHosts /root/.ssh/known_hosts
|
|
||||||
cp "$VALHALLA_BACKUP_SERVER_KEY" "$mountDir$VALHALLA_BACKUP_SERVER_KEY"
|
|
||||||
cp $knownHosts "$mountDir$knownHosts"
|
|
||||||
end
|
|
||||||
|
|
||||||
and echo "Cloning project..."
|
and echo "Cloning project..."
|
||||||
and source "$dir/../../lib/copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
and source "$dir/../../lib/copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
||||||
runChroot "$mountDir" git config --system --add safe.directory "$PROJECT_CLONE_ROOT"
|
runChroot "$mountDir" git config --system --add safe.directory "$PROJECT_CLONE_ROOT"
|
||||||
|
@ -61,18 +52,7 @@ function runSetup
|
||||||
|
|
||||||
wrapScript (
|
wrapScript (
|
||||||
string join " " \
|
string join " " \
|
||||||
(begin
|
"CONFIG_NAME=$(string escape "$CONFIG_NAME")" \
|
||||||
for var in \
|
|
||||||
CONFIG_NAME \
|
|
||||||
VALHALLA_BACKUP_DISABLED \
|
|
||||||
VALHALLA_BACKUP_DIR \
|
|
||||||
VALHALLA_BACKUP_SERVER \
|
|
||||||
VALHALLA_BACKUP_SERVER_PORT \
|
|
||||||
VALHALLA_BACKUP_SERVER_USER \
|
|
||||||
VALHALLA_BACKUP_SERVER_KEY
|
|
||||||
echo "$var=$(string escape "$$var")"
|
|
||||||
end
|
|
||||||
end) \
|
|
||||||
(string escape $script))
|
(string escape $script))
|
||||||
|
|
||||||
end | runChroot "$mountDir" tee /root/.bash_profile >/dev/null
|
end | runChroot "$mountDir" tee /root/.bash_profile >/dev/null
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
set -l dir (status dirname)
|
set -l dir (status dirname)
|
||||||
|
|
||||||
function initBackupConfig -V dir -d "Fetches the configuration by prompting the user to "
|
function initConfig -V dir -d "Fetches the configuration by prompting the user to "
|
||||||
set -l disabled VALHALLA_BACKUP_DISABLED
|
set -l disabled VALHALLA_BACKUP_DISABLED
|
||||||
|
|
||||||
if [ -z "$$disabled" ]
|
if [ -z "$$disabled" ]
|
||||||
|
|
Loading…
Reference in a new issue