Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Script detele file or videos after few days #23

Closed
wants to merge 1 commit into from

Conversation

garvarma
Copy link
Contributor

Delete records from SD or device after X days, and generate a log file.

Delete records from SD or device after X days, and generate a log file.
@fritz-smh
Copy link
Owner

Hi,

Are you sure a final / is not missing in the dir variable ?
The log is generated in the record dir, is this the goal ?

Thanks for the PR, I wait your answer before merging.

++
Fritz

@garvarma
Copy link
Contributor Author

Hello,
Well i did it into my NAS and worked well, dir variable is defined at the beginning.

I must check it in camera, but as i told you, in my nas worked well

Yes, log is created in the dir variable with the date that is execute script.

From my side, i have few questions about main or default web in http server in xiaomi

Can you help me?

Enviado desde mi iPhone

El 20 abr 2016, a las 21:23, Fritz SMH [email protected] escribió:

Hi,

Are you sure a final / is not missing in the dir variable ?
The log is generated in the record dir, is this the goal ?

Thanks for the PR, I wait your answer before merging.

++
Fritz


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@garvarma
Copy link
Contributor Author

Hello,
Yesterday i didn't checked code, and reply sorry.
Now i can see that you are right, is missing / in the dir variable. And as i told you, log is generated in the record dir.

thanks

@fritz-smh
Copy link
Owner

OK, do you plan to fix this PR or du you expect me to do the fix after
merging (just to know).

About the question on the web server, please create a ticket with your
questions, it will be easier for me to follow :)

On Thu, Apr 21, 2016 at 8:25 AM, garvarma [email protected] wrote:

Hello,
Yesterday i didn't checked code, and reply sorry.
Now i can see that you are right, is missing / in the dir variable. And as
i told you, log is generated in the record dir.

thanks


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#23 (comment)

@nono56
Copy link

nono56 commented Apr 25, 2016

Hello!
Where did you put this file please?
How do you execute this file? Cron?
Thanks

@garvarma
Copy link
Contributor Author

Hi,
You can put it where you want, just you must put in variable dir= the route where are videos and folders.
You can execute with ./namefile.sh, but if you want do it automatic, then yes, execute qith cron

@nono56
Copy link

nono56 commented Apr 25, 2016

Thanks!

@fritz-smh
Copy link
Owner

I don't forget this PR, just very busy these days. Will merge in a few days

@k4r4su
Copy link

k4r4su commented Apr 26, 2016

Hi,

I have execute this script directly on the XiaoYi Camera and :

  • the du -bsh command have a pb : -b isnt recognize.
  • the missing "/" in the dir variable.

Except this, it works well.

Unfortunately, cron isnt implemented on the XiaoYi cam, so i cant launch the task automatically :(

Thank you :)

@garvarma
Copy link
Contributor Author

Hi,
I didn't checked already script on camera because some friends asked to me to check camera and now i don't have it. But i checked on my nas and worked.

Once i will have it i will check

Thanks

Enviado desde mi iPhone

El 26 abr 2016, a las 22:46, k4r4su [email protected] escribió:

Hi,

I have execute this script directly on the XiaoYi Camera and :

the du -bsh command have a pb : -b isnt recognize.
the missing "/" in the dir variable.
Except this, it works well.

Thank you :)


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@fritz-smh
Copy link
Owner

Hi,

Were you able to check ?

Thanks,
Fritz

@coomsie
Copy link

coomsie commented May 13, 2016

Gidday,

for this to work for me .... below are the changes

dir="/home/hd1/record/"

i.e. add '/' at end

du -sh ${dir} > ${dir}Delete_$dt.log
du -sh ${dir} >> ${dir}Delete_$dt.log

remove the -b

@fritz-smh
Copy link
Owner

Applied in a01f61f

@fritz-smh fritz-smh closed this Jun 8, 2016
fritz-smh added a commit that referenced this pull request Jun 8, 2016
@fritz-smh
Copy link
Owner

small update : 27e3fa9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants