A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys, Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun VPN routing, and a web dashboard to manage it all. Free & open forever to self-host; optional paid hosted services fund it. See PROMISE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
23 lines
657 B
Bash
Executable File
23 lines
657 B
Bash
Executable File
#!/bin/bash
|
|
|
|
moveFile()
|
|
{
|
|
local file="$1"
|
|
local file_name=$(basename "$file")
|
|
local save_dir="$2"
|
|
local save_dir_file=$(basename "$save_dir")
|
|
local clean_dir=$(echo "$save_dir" | sed 's#//*#/#g')
|
|
|
|
if [ -e "$file" ]; then
|
|
local result=$(sudo mv "$file" "$save_dir")
|
|
checkSuccess "Moving $file_name to $save_dir"
|
|
|
|
if [[ $clean_dir != *"$containers_dir"* ]]; then
|
|
local result=$(sudo chown $sudo_user_name:$sudo_user_name "$save_dir")
|
|
checkSuccess "Updating $save_dir_file with $sudo_user_name ownership"
|
|
fi
|
|
else
|
|
isNotice "Source file does not exist: $file"
|
|
fi
|
|
}
|