New backup 2025-08-23 13:02:24
This commit is contained in:
parent
c6ee5cce25
commit
9ba850b085
2 changed files with 21 additions and 0 deletions
20
default/home/.local/bin/serverutil-deb-upload
Executable file
20
default/home/.local/bin/serverutil-deb-upload
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z ${1} ]]; then
|
||||
printf 'File not provided!\n'
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f "${1}" ]]; then
|
||||
printf 'File does not exist!\n'
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${1}" != *'.deb' ]]; then
|
||||
printf 'File is not a deb!\n'
|
||||
exit 1
|
||||
fi
|
||||
if ! ping -c 1 -w 10 server-dell-7050sff-debian &>/dev/null; then
|
||||
printf 'Server inaccessible!\n'
|
||||
exit 2
|
||||
fi
|
||||
printf 'Sending file to server: %s\n' "${1}"
|
||||
scp "${1}" pogmom@server-dell-7050sff-debian:/home/pogmom/debs/
|
|
@ -12,3 +12,4 @@ Scripts/iso_updater.sh
|
|||
.local/bin/rdict
|
||||
.config/fastfetch/config.jsonc
|
||||
Scripts/fix-swap-part.sh
|
||||
.local/bin/serverutil-deb-upload
|
||||
|
|
Loading…
Add table
Reference in a new issue