Creating a folder through the WebUI


ramontayag

Recommended Posts

Because this is a lacking feature I came up with a script solution which monitors the log file. Whenever the statement "addsyncfolder" occurs, the script tests the existence of this folder, if it does not it will create it. Basically you can only create folders this way, but you cannot delete them. But for testing purposes it is enough and it is somewhat conivient. It is not a nice solution but works quite well for now.

#!/bin/bash        tail -f /home/Sync/.sync/sync.log| while read line; do                echo $line |grep addsyncfolder > /dev/null 2>&1                if [[ $? == 0 ]] ; then                        NEWDIR=`echo $line|grep -o addsyncfolder\&name.*secret `;                        NEWDIR=`echo $NEWDIR|sed -e 's/addsyncfolder\&name=//g'| sed -e 's/%2F/\//g'|sed -e 's/\&secret//g'`;                        if [[ ! -e /home/Sync/$NEWDIR ]] ; then                                mkdir /home/Sync/$NEWDIR                        fi                fi        done

Maybe it can help you too.

So long

Doc Green

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.