Update 2025-02-26 07:55 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id
2025-02-26 07:55:15 +01:00
parent 3794862593
commit 475bef8131
4 changed files with 57 additions and 51 deletions

View File

@@ -1,18 +1,23 @@
#!/bin/sh
USBDISK=/mnt/1TB
case "$1" in
put|push) shift; rsync -rv --progress --append-verify $@ osmc:/media/USBDisk/ ;;
df) shift; ssh osmc "df -h /media/USBDisk/" ;;
ls) shift; ssh osmc "cd /media/USBDisk/ && ls $@ | grep -v lost+found" ;;
lls) shift; ssh osmc "cd /media/USBDisk/ && ls -lh | grep -v lost+found" ;;
del) shift; ssh osmc "cd /media/USBDisk/ && rm -v $@" ;;
ren) shift; ssh osmc "cd /media/USBDisk/ && mv \"$1\" \"$2\"" ;;
mount) shift; ssh -tt osmc "sudo /sbin/cryptdisks_start usbdisk" \
&& ssh osmc "sudo mount /mnt/1TB" ;;
put|push) shift; rsync -rv --progress --append-verify "$@" osmc:$USBDISK/ ;;
df) shift; ssh osmc "df -h $USBDISK" ;;
ls) shift; ssh osmc "cd $USBDISK && ls $@ | grep -v lost+found" ;;
lls) shift; ssh osmc "cd $USBDISK && ls -lh | grep -v lost+found" ;;
del) shift; ssh osmc "cd $USBDISK && rm -v $@" ;;
ren) shift; ssh osmc "cd $USBDISK && mv \"$1\" \"$2\"" ;;
at) shift; ssh -tt osmc "tmux at" ;;
*) echo "usage: osmc <command> <args>"
echo " mount - mount USB disk"
echo " df - show disk space allocation"
echo " ls - list files"
echo " lls - list files with details"
echo " put <files> - copy files to USBDisk"
echo " put <files> - copy files to USB disk"
echo " ren <old> <new> - rename file"
echo " del <files> - delete file"
echo " at - attach to tmux session"