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