/volume1/script/test.sh > /volume1/log/skript.log
#!/bin/sh
FTP_HOST="<<www.myserver.de/file.jpg>>"
FTP_USER=<<user>>
FTP_PASS=<<pwd>>
SOURCE_DIR='/volume1/surveillance/@Snapshot/'
SOURCE_IMAGE=$(ls -p -t $SOURCE_DIR | /usr/bin/head -2 | /usr/bin/tail -1)
/usr/bin/curl ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T /volume1/surveillance/@Snapshot/$SOURCE_IMAGE
/volume1/script/blubb.sh >/volume1/log/skript.log 2>&1
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:$PATH
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:$PATH
FTP_HOST="<<www.myserver.de/file.jpg>>"
FTP_USER=<<user>>
FTP_PASS=<<pwd>>
SOURCE_DIR='/volume1/surveillance/@Snapshot/'
SOURCE_IMAGE=$(ls -1pt $SOURCE_DIR/*.jpg | /usr/bin/head -1)
/usr/bin/curl ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T $SOURCE_DIR/$SOURCE_IMAGE
curl: Can't open '/volume1/surveillance/@Snapshot///volume1/surveillance/@Snapshot//
/usr/bin/curl ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T $SOURCE_DIR/$SOURCE_IMAGE
echo /usr/bin/curl ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T $SOURCE_DIR/$SOURCE_IMAGE
#!/bin/sh
FTP_HOST="www.myserver.de/file.jpg"
FTP_USER=user
FTP_PASS=pwd
SOURCE_DIR='/volume1/surveillance/@Snapshot'
SOURCE_IMAGE=$(/bin/ls -1pt $SOURCE_DIR/*.jpg | /usr/bin/head -1)
/bin/echo ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T $SOURCE_DIR/$SOURCE_IMAGE
/usr/bin/curl ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T $SOURCE_DIR/$SOURCE_IMAGE
sh test.sh >/volume1/script/script.log 2>&1
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:$PATH
FTP_HOST="www.mywebspace.de/test.jpg"
FTP_USER=usr
FTP_PASS=pwd
SOURCE_DIR='/volume1/surveillance/@Snapshot'
SOURCE_IMAGE=$(ls -1pt $SOURCE_DIR/*.jpg | /usr/bin/head -1)
/usr/bin/curl ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T $SOURCE_IMAGE
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M 4 1118k 0 0 4 50832 0 72651 0:00:15 --:--:-- 0:00:15 72721^M 20 1118k 0 0 20 231k 0 104k 0:00:10 0:00:02 0:00:08 1
sh: /volume1/script/test.sh: Permission denied
-rw-r--r-- 1 root root 385 Nov 9 21:40 test.sh
chmod 755 /volume1/script/test.sh
chmod 777 /volume1/script/script.log
mynas>chmod -rwx test.sh
mynas> ls -all
drwxr-xr-x 3 root root 4096 Nov 9 22:07 .
drwxr-xr-x 15 root root 4096 Nov 9 22:07 ..
drwxrwxrwx 3 root root 4096 Nov 9 03:50 @eaDir
-rw-r--r-- 1 root root 47 Nov 9 21:52 script.log
---------- 1 root root 385 Nov 9 21:40 test.sh
mynas> chmod 755 test.sh
mynas> ls -all
drwxr-xr-x 3 root root 4096 Nov 9 22:07 .
drwxr-xr-x 15 root root 4096 Nov 9 22:07 ..
drwxrwxrwx 3 root root 4096 Nov 9 03:50 @eaDir
-rw-r--r-- 1 root root 47 Nov 9 21:52 script.log
-rwxr-xr-x 1 root root 385 Nov 9 21:40 test.sh
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:
FTP_HOST="www.myhost.com/image2.jpg"
FTP_USR= username
FTP_PASS= password
SOURCE_DIR='/volume1/surveillance/@Snapshot'
SOURCE_IMAGE=$(ls -1pt $SOURCE_DIR/cam2*.jpg | /usr/bin/head -1)
/usr/bin/curl ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T $SOURCE_IMAGE
FTP_HOST="www.myhost.com/image2.jpg"
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:$PATH
FTP_USER=username
FTP_PASS=password
FTP_HOST="www.mydomain.com/cam1.jpg"
SOURCE_DIR='/volume1/surveillance/@Snapshot'
SOURCE_IMAGE=$(ls -1pt $SOURCE_DIR/cam1*.jpg | /usr/bin/head -1)
/usr/bin/curl ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T $SOURCE_IMAGE
FTP_HOST="www.mydomain.com/cam2.jpg"
SOURCE_IMAGE=$(ls -1pt $SOURCE_DIR/cam2*.jpg | /usr/bin/head -1)
/usr/bin/curl ftp://$FTP_USER:$FTP_PASS@$FTP_HOST -T $SOURCE_IMAGE
Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.
Als Dankeschön schalten wir deinen Account werbefrei.