Skip to content

one-line scripts vs plugins #230

Answered by VR-25
laur89 asked this question in Q&A
Discussion options

You must be logged in to vote

Plugins are actual sh files and can contain multiple lines.

One-line scripts are part of the config itself. This makes them simpler, easier to work with and more dynamic.

Plugins are usually meant for overriding internal functions and variables.
Unlike one-line scripts, they are loaded only once, when the daemon starts.

Among many possibilities, one-line scripts can be used for scheduling.
I use these for overriding virtual memory parameters as well (which has nothing to do with acc):

: vm; vm="swappiness=1 vfs_cache_pressure=10 dirty_expire_centisecs=0 dirty_background_ratio=2 dirty_writeback_centisecs=0 dirty_ratio=75"; for i in $vm; do sysctl -w vm.$i >/dev/null; done

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by laur89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants