Update 2024-12-23 18:49 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id 2024-12-23 18:49:14 +01:00
parent ec7fbad49f
commit 31c62ae69a

View File

@ -14,11 +14,17 @@
# remote patch uploaded files should go # remote patch uploaded files should go
_rpath="/home/www/htdocs/ptrace/paste" _rpath="/home/www/htdocs/ptrace/paste"
# web url where the uploaded files can be accessed # web url where the uploaded files can be accessed
_weburi="https://ptrace.org" _weburi="https://ptrace.org"
# ssh user@host # ssh user@host
_sshhost="sdk@codevoid.de" _sshhost="sdk@codevoid.de"
# permissions (for the fixl command)
_chown="sdk:www"
_chmod="u+rw,g+r"
### ###
### SET ARGUMENT SWITCHES ### SET ARGUMENT SWITCHES
### ###
@ -160,8 +166,9 @@ if [ -n "$_fixperm" ]
then then
lastfile="$(remote_list | tail -1)" lastfile="$(remote_list | tail -1)"
echo "Fixing: $lastfile" echo "Fixing: $lastfile"
ssh $_sshhost "cd $_rpath/ \ ssh $_sshhost "cd $_rpath/; \
&& chmod u+rw,g+r \"$lastfile\"; \ chown $_chown \"$lastfile\"; \
chmod $_chmod \"$lastfile\"; \
ls -lh \"$lastfile\"" ls -lh \"$lastfile\""
exit 0 exit 0
fi fi
@ -233,8 +240,6 @@ then
echo " upload [filename] < file" echo " upload [filename] < file"
echo " cat file | upload [filename]" echo " cat file | upload [filename]"
echo echo
echo " <files> - files or directories to upload"
echo
echo " Commands:" echo " Commands:"
echo " rm <files> - remove files" echo " rm <files> - remove files"
echo " rml - remove last upload" echo " rml - remove last upload"
@ -243,12 +248,14 @@ then
echo " -0..N - list N last files" echo " -0..N - list N last files"
echo " mv|ren <oldname> <newname> - rename file" echo " mv|ren <oldname> <newname> - rename file"
echo " mvl|renl <newname> - rename last uploaded file" echo " mvl|renl <newname> - rename last uploaded file"
echo " fixl - fix permission on last uploaded file" echo " fixl - fix permission of last uploaded file"
echo echo
echo " Extensions:" echo " Extensions:"
echo " sh, ksh, txt, log - add extension to file" echo " sh, ksh, txt, log - add extension to file"
echo " gz, tgz - uploads file as archive (tgz is always used for folders)" echo " gz, tgz - uploads file as archive (tgz is always used for folders)"
echo echo
echo " <files> - files or directories to upload (needs to be the last argument)"
echo
echo "Special Case:" echo "Special Case:"
echo " When data is piped to the script it expects only one" echo " When data is piped to the script it expects only one"
echo " optional argument, which would be the target filename." echo " optional argument, which would be the target filename."