Script "nc-occ" - interactive occ interface


nc-occ

  • brings you the occ feature you have always wanted and missed most, without even knowing.
  • is a wrappper for occ.
  • interactively creates your occ commands.

Whenever you need to quickly make an occ task but you don’t want to look up the manual for the exact call syntax. Just call nc-occ and get started interactively.
It’s basically just a wrapper, but it can make your life a lot easier.
This is the first ebtb script with all-in-one support but since it is still rudimentary, it is only for the most basic installation, no docker rootles or other diferent setups are tested yet.
Nextcloud All-in-One is supported, containerized solutions other than AIO are not (yet) supported

This script was created with → ebtb ← .

Install it this way:

sudo wget -O /usr/local/bin/nc-occ https://global-social.net/script/nc-occ
sudo chmod +x /usr/local/bin/nc-occ

Explanation:
- the first line downloads the script into the directory /usr/local/bin
- the second line makes it executable

You only need to install it once.
As all of my → ebtb ← scripts, it comes signed and does an integrity check on the first run and checks for updates on every startup.

Simply run it:

nc-occ

This is the help output:

~# nc-occ --help

    Simply run

        nc-occ

    to create your occ commands interactively.

    Possible options:

        -h | --help
                this help message
        -a | --all_options
                include the unimportant options
                help, quiet, verbose, version, ansi, no-ansi, no-interaction, no-warnings
        --show_help
                show the help output from the commands instead of brief usage message

I really hope that this tool will make your life easier and save you a lot of searching and time in future.


Much and good luck,
ernolf

2 Likes

nc-occ now also offers the option to save frequently used occ commands as favorites.
It already comes with some preset favorites to make it clear how it’s intended.
Especially for admins who frequently need to run an occ command, such as scanning a folder with a complicated path and username, they now only need to assemble the occ command once with the occ commandline composer and then save it as a favorite. After that, they can easily select it from the list again with one click.

You should absoluteky try it out, it makes live a lot easier.

Feedback, such as suggestions for preset defaults or other feature requests are more than welcome.
I hope you enjoy it a lot!


ernolf

How does Nextcloud behave if two administrators execute the same long-running OCC command at the same time?

Hi @Sanook,

good question!

Of course, it depends crucially on which specific occ command is being used exactly (details matter).
However, I haven’t yet tried, for example, scanning a file branch from two prompts simultaneously.
Administration, not just of a Nextcloud server, is like the military or a kitchen: There’s only one general or head chef.
If possible, you shouldn’t organize it so that everyone can do whatever they want.

However, many commands have a built-in guard that ensures that there are no side effects due to race conditions.

But if you want to find out for sure, you should set up a lab VM and push it to the limit with such parallels to determine exactly what’s happening. You might actually find vulnerabilities that, if you can debug them, could lead to code improvements.


ernolf

1 Like