Jump to content
Squid

[Plugin] CA User Scripts

794 posts in this topic Last Reply

Recommended Posts

Release more kickass functionality for your favorite tech items. ;)

Share this post


Link to post

Really?!  Damn I got some catching up to do....

Man, I never hit the linux command line (beyond very very basic stuff - I'm a DOS guy) prior to just before CR was released (or wrote a line of code since I was a teenager).  Look how far you've come with the dvb plugin

 

Sent from my LG-D852 using Tapatalk

 

 

Share this post


Link to post

Errr.  You wrote that... I just maintain it.... without fully understanding how a lot of it works. :)

Share this post


Link to post

Errr.  You wrote that... I just maintain it.... without fully understanding how a lot of it works. :)

Fine.  I'll get you to do all the html/css for me then as that's one thing I just have a bitch of a time wrapping my head around

 

Sent from my LG-D852 using Tapatalk

 

 

Share this post


Link to post

What's html & css? ;)

My thoughts exactly

 

Sent from my LG-D852 using Tapatalk

 

 

Share this post


Link to post

Did some research, and due to how I handle the enabling / disabling of the buttons when running in the background, there is a limitation on what characters are allowed in the name of the folder

 

Only letters ([A-Za-z]), digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), periods ("."), and spaces (" ") are allowed.  Anything else will mess up the background running (but will probably work in the foreground)

 

Technically, other characters would be valid, but due to the massive amount of escaping, you're best to just keep it simple.  In particular, avoid single and double quotes.  This is because of the HTML, not passing the command to bash.

 

An update will be released tomorrow which will handle spaces in the folder names (oversight on my part), after further testing.

Share this post


Link to post

What's html & css? ;)

It's abbreviations. You can read more about it in this link  ;D

Share this post


Link to post

What's html & css? ;)

More things without vowels...

lmao I like this guy!!!

Share this post


Link to post

Quick question:

If I close the script windows, does it actually halt the command that has already been called?

 

So I created a script that manually trigger the mover (which naturally takes a while to run). But then that's the only command so I wonder if I can simply close the script windows and the mover would continue to run.

Share this post


Link to post

Yeah it would stop the command.  You would need to run it in the background.  Aborts on background tasks will kill the running script, but if the script called a long running command at the time of abort (something like find) then that command will run to completion.

 

Sent from my LG-D852 using Tapatalk

 

 

Share this post


Link to post

Would it be possible to add the ability to schedule a script, to run every x hour? Or each monday at x (like CA has with appdata backup).

Share this post


Link to post

So that I don't get too much feature creep on this would hourly, daily, weekly, monthly suffice set via dynamix scheduled suffice?

 

Sent from my LG-D852 using Tapatalk

 

 

Share this post


Link to post

So that I don't get too much feature creep on this would hourly, daily, weekly, monthly suffice set via dynamix scheduled suffice?

 

Sent from my LG-D852 using Tapatalk

Yep, that would be perfect  8)

Share this post


Link to post

Now go easy on me here as I've been awake over 24 hours pretty much...

 

I've spent an hour trying to work out where I was going wrong......

 

It won't execute the script if it's called script.sh  :P

 

 

Share this post


Link to post

Now go easy on me here as I've been awake over 24 hours pretty much...

 

I've spent an hour trying to work out where I was going wrong......

 

It won't execute the script if it's called script.sh 

Create a file called script this will be the actual script.

 

It's also on the plug page.  Everything chosen to make it easier for noobs

Share this post


Link to post

Now go easy on me here as I've been awake over 24 hours pretty much...

 

I've spent an hour trying to work out where I was going wrong......

 

It won't execute the script if it's called script.sh  :P

Create a file called script this will be the actual script.

 

It's also on the plug page

 

I'm not debating that, just telling you I made an IT10T error...  ;D

Share this post


Link to post

Now go easy on me here as I've been awake over 24 hours pretty much...

 

I've spent an hour trying to work out where I was going wrong......

 

It won't execute the script if it's called script.sh  :P

Create a file called script this will be the actual script.

 

It's also on the plug page

 

I'm not debating that, just telling you I made an IT10T error...  ;D

ID10T. Heh.  8)

Share this post


Link to post

Hey Squid,

 

Just been trying this with a kernel compiling script. 

 

#!/bin/bash
wget https://raw.githubusercontent.com/CHBMB/Unraid-DVB/master/build_scripts/kernel_compile_modules/kernel_compile_module_use_config_beta.sh -P /mnt/disk1/dvb/
chmod +x /mnt/disk1/dvb/kernel_compile_module_use_config_beta.sh
cd /mnt/disk1/dvb/
/mnt/disk1/dvb/kernel_compile_module_use_config_beta.sh

 

Now i'm running it in the foreground so I can follow it's progress, but it's running very slowly, well specifically, the logging seems to be running slowly, the actual script is running faster I think if that makes sense.

 

Can't quite get my head around what is happening apart from maybe my CPU is flat out and the logging is lagging behind...

Share this post


Link to post

If there's tons and tons and tons of stuff to display then it's going to lag because of the constant page update for each line and chrome chugging through it.  No different than hitting the log button on unraid keeping it open for a month (so there's an insane amount of lines already displayed) and the watching it as you log more items.

 

Nothing I can do about it.

 

The upcoming background running with logging will alleviate that to a certain extent

 

Sent from my LG-D852 using Tapatalk

 

 

Share this post


Link to post

If there's tons and tons and tons of stuff to display then it's going to lag because of the constant page update for each line and chrome chugging through it.  No different than hitting the log button on unraid keeping it open for a month (so there's an insane amount of lines already displayed) and the watching it as you log more items.

 

Nothing I can do about it.

 

The upcoming background running with logging will alleviate that to a certain extent

 

Sent from my LG-D852 using Tapatalk

 

 

Great confirms what I thought.  I'll run it as a background and send an alert when it's finished.

Share this post


Link to post

ALL GLORY TO THE HYPNOTOAD

 

- Added in automatic background script logging (and ability to delete the logs when the script isn't running)

- Fixed the inability to run a script in the background if the directory contained a space

 

The log display is just a tail of the log  (at the start and end of execution, the plugin will inform you of the location of the complete log should you need to analyze it)

 

ALL GLORY TO THE HYPNOTOAD

Share this post


Link to post

keep-calm-and-trust-in-karma.png

 

Added in background scheduling for scripts

 

Schedules are hourly, daily, weekly, monthly.  The time of execution can be modified by the Dynamix Schedules plugin (available on CA)

 

 

Edited by Squid

Share this post


Link to post

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.   Restore formatting

  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.