Skip to content
/ ebtb Public

ernolfs bash tool box - scripts for nextcloud admins

Notifications You must be signed in to change notification settings

ernolf/ebtb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ebtb

ernolfs bash tool box - scripts for nextcloud admins

With this toolbox, complex scripts can be created quickly because recurring tasks are consistently modularized. They only need to be listed as dependencies at the beginning of a script in the correct order.

The modules as well as the scripts are usually signed and hosted on my Nextcloud web server, which is the home of the scripts. From there, you can download signed versions that are always up-to-date and self-updating.

Important

The scripts are designed for and on debian based distributions. Whether and to what extent they work on non-debian systems has not been tested.


These are the scripts available for installation:

scripts to interact with a nextcloud installation

Note

These scripts are primarily developed for baremetal and vm installations and partially adapted for Nextcloud All-in-One. Other containerized solutions like snap or docker are not (yet) supported.

  • nc-apps

    command-line client for the Nextcloud appstore

    • Nextcloud All-in-One
    • Nextcloud snap
    • MySQL/MariaDB
    • PostgreSQL
    • SQLite3
    • install nc-apps
      sudo wget -O /usr/local/bin/nc-apps https://global-social.net/script/nc-apps
      sudo chmod +x /usr/local/bin/nc-apps
  • nc-integrity-fix

    resolve "Some files have not passed the integrity check" warnings

    • Nextcloud All-in-One
    • Nextcloud snap
    • MySQL/MariaDB
    • PostgreSQL
    • SQLite3
    • install nc-integrity-fix
      sudo wget -O /usr/local/bin/nc-integrity-fix https://global-social.net/script/nc-integrity-fix
      sudo chmod +x /usr/local/bin/nc-integrity-fix
  • nc-occ

    completely reinvented interactive occ interface that makes it easier to find the right command with the available options and arguments for your task

    • Nextcloud All-in-One
    • Nextcloud snap
    • MySQL/MariaDB
    • PostgreSQL
    • SQLite3
    • install nc-occ
      sudo wget -O /usr/local/bin/nc-occ https://global-social.net/script/nc-occ
      sudo chmod +x /usr/local/bin/nc-occ
  • nc-who

    similar to unix who, follow live who is logged in on your Nextcloud server

    • Nextcloud All-in-One
    • Nextcloud snap
    • MySQL/MariaDB
    • PostgreSQL
    • SQLite3
    • install nc-who
      sudo wget -O /usr/local/bin/nc-who https://global-social.net/script/nc-who
      sudo chmod +x /usr/local/bin/nc-who
  • nc-sql

    command-line client for the nextcloud database

    • Nextcloud All-in-One
    • Nextcloud snap
    • MySQL/MariaDB
    • PostgreSQL
    • SQLite3
    • install nc-sql
      sudo wget -O /usr/local/bin/nc-sql https://global-social.net/script/nc-sql
      sudo chmod +x /usr/local/bin/nc-sql
  • nc-shares

    list shares with their tokens and full path on the command line

    • Nextcloud All-in-One
    • Nextcloud snap
    • MySQL/MariaDB
    • PostgreSQL
    • SQLite3
    • install nc-shares
      sudo wget -O /usr/local/bin/nc-shares https://global-social.net/script/nc-shares
      sudo chmod +x /usr/local/bin/nc-shares
  • nc-subscribed-calendar

    define the refresh rate of subscribed calendars per calendar instead of one refresh rate for all subscribed calendars

    • Nextcloud All-in-One
    • Nextcloud snap
    • MySQL/MariaDB
    • PostgreSQL
    • SQLite3
    • install nc-subscribed-calendar
      sudo wget -O /usr/local/bin/nc-subscribed-calendar https://global-social.net/script/nc-subscribed-calendar
      sudo chmod +x /usr/local/bin/nc-subscribed-calendar
  • nc-mimecheck

    mimetype checker script to integrate with flow external script

    • Nextcloud All-in-One
    • Nextcloud snap
    • MySQL/MariaDB
    • PostgreSQL
    • SQLite3
    • install nc-mimecheck
      sudo wget -O /usr/local/bin/nc-mimecheck https://global-social.net/script/nc-mimecheck
      sudo chmod +x /usr/local/bin/nc-mimecheck

scripts to maintain PHP on your server

  • php-updater

    update PHP on your ubuntu/debian based server and switch back and forth between versions without much hassle

  • php-module-builder

    build PHP modules on your ubuntu/debian based server that cannot be built with PECL, like Lua

    • debian based distributions with dpkg

    • install php-module-builder
      sudo wget -O /usr/local/bin/php-module-builder https://global-social.net/script/php-module-builder
      sudo chmod +x /usr/local/bin/php-module-builder
    • supported modules

      Columns 8.0 to 8.4: available packaged versions for Debian/Ubuntu from "Debian PHP Maintainers" (OndΕ™ej SurΓ½)

      Module 8.0 8.1 8.2 8.3 8.4 php-module-builder
      amqp 🟒 🟒 🟒 🟒 🟒
      apcu 🟒 🟒 🟒 🟒 🟒 βœ…
      ast 🟒 🟒 🟒 🟒 🟒
      bcmath 🟒 🟒 🟒 🟒 🟒
      brotli πŸ”΄ πŸ”΄ πŸ”΄ πŸ”΄ πŸ”΄ βœ…
      bz2 🟒 🟒 🟒 🟒 🟒
      cgi 🟒 🟒 🟒 🟒 🟒
      cli 🟒 🟒 🟒 🟒 🟒
      common 🟒 🟒 🟒 🟒 🟒
      curl 🟒 🟒 🟒 🟒 🟒
      dba 🟒 🟒 🟒 🟒 🟒
      decimal 🟒 🟒 🟒 🟒 πŸ”΄ βœ…
      dev 🟒 🟒 🟒 🟒 🟒
      dio 🟒 🟒 🟒 🟒 πŸ”΄
      ds 🟒 🟒 🟒 🟒 🟒
      enchant 🟒 🟒 🟒 🟒 🟒
      excimer 🟒 🟒 🟒 🟒 🟒 βœ…
      facedetect 🟒 🟒 πŸ”΄ πŸ”΄ πŸ”΄ βœ…
      fpm 🟒 🟒 🟒 🟒 🟒
      gd 🟒 🟒 🟒 🟒 🟒
      gearman 🟒 🟒 🟒 🟒 🟒
      gmagick 🟒 🟒 🟒 🟒 🟒
      gmp 🟒 🟒 🟒 🟒 🟒
      gnupg 🟒 🟒 🟒 🟒 🟒
      grpc 🟒 🟒 🟒 🟒 πŸ”΄
      http 🟒 🟒 🟒 🟒 🟒
      igbinary 🟒 🟒 🟒 🟒 🟒 βœ…
      imagick 🟒 🟒 🟒 🟒 🟒 βœ…
      imap 🟒 🟒 🟒 🟒 🟒
      inotify 🟒 🟒 🟒 🟒 πŸ”΄ βœ…
      interbase 🟒 🟒 🟒 🟒 🟒
      intl 🟒 🟒 🟒 🟒 🟒
      ldap 🟒 🟒 🟒 🟒 🟒
      libvirt-php 🟒 🟒 🟒 🟒 🟒
      lua πŸ”΄ πŸ”΄ πŸ”΄ πŸ”΄ πŸ”΄ βœ…
      lz4 🟒 🟒 🟒 🟒 πŸ”΄ βœ…
      mailparse 🟒 🟒 🟒 🟒 🟒
      maxminddb 🟒 🟒 🟒 🟒 🟒
      mbstring 🟒 🟒 🟒 🟒 🟒
      mcrypt 🟒 🟒 🟒 🟒 🟒
      memcache 🟒 🟒 🟒 🟒 🟒 βœ…
      memcached 🟒 🟒 🟒 🟒 🟒 βœ…
      mongodb 🟒 🟒 🟒 🟒 🟒
      msgpack 🟒 🟒 🟒 🟒 🟒 βœ…
      mysql 🟒 🟒 🟒 🟒 🟒
      oauth 🟒 🟒 🟒 🟒 🟒
      odbc 🟒 🟒 🟒 🟒 🟒
      opcache 🟒 🟒 🟒 🟒 🟒
      pcov 🟒 🟒 🟒 🟒 🟒
      pgsql 🟒 🟒 🟒 🟒 🟒
      phalcon5 🟒 🟒 🟒 🟒 πŸ”΄
      phpdbg 🟒 🟒 🟒 🟒 🟒
      pinba 🟒 🟒 🟒 🟒 πŸ”΄
      pq 🟒 🟒 🟒 🟒 🟒
      propro 🟒 🟒 🟒 πŸ”΄ πŸ”΄
      protobuf 🟒 🟒 🟒 🟒 πŸ”΄
      ps 🟒 🟒 🟒 🟒 🟒
      pspell 🟒 🟒 🟒 🟒 🟒
      psr 🟒 🟒 🟒 🟒 🟒
      raphf 🟒 🟒 🟒 🟒 🟒
      rdkafka 🟒 🟒 🟒 🟒 πŸ”΄
      readline 🟒 🟒 🟒 🟒 🟒
      redis 🟒 🟒 🟒 🟒 🟒 βœ…
      rrd 🟒 🟒 🟒 🟒 🟒 βœ…
      smbclient 🟒 🟒 🟒 🟒 πŸ”΄ βœ…
      snmp 🟒 🟒 🟒 🟒 🟒
      soap 🟒 🟒 🟒 🟒 🟒
      solr 🟒 🟒 🟒 🟒 πŸ”΄ βœ…
      sqlite3 🟒 🟒 🟒 🟒 🟒
      ssh2 🟒 🟒 🟒 🟒 🟒 βœ…
      stomp 🟒 🟒 🟒 🟒 🟒 βœ…
      swoole 🟒 🟒 🟒 🟒 πŸ”΄ βœ…
      sybase 🟒 🟒 🟒 🟒 🟒
      tideways 🟒 🟒 🟒 πŸ”΄ πŸ”΄ βœ…
      tidy 🟒 🟒 🟒 🟒 🟒
      uopz 🟒 🟒 🟒 🟒 🟒 βœ…
      uploadprogress 🟒 🟒 🟒 🟒 🟒 βœ…
      uuid 🟒 🟒 🟒 🟒 🟒 βœ…
      vips 🟒 🟒 🟒 🟒 πŸ”΄ βœ…
      xdebug 🟒 🟒 🟒 🟒 🟒 βœ…
      xhprof 🟒 🟒 🟒 🟒 πŸ”΄ βœ…
      xml 🟒 🟒 🟒 🟒 🟒
      xmlrpc 🟒 🟒 🟒 🟒 🟒
      xsl 🟒 🟒 🟒 🟒 🟒
      yac 🟒 🟒 🟒 🟒 🟒 βœ…
      yaml 🟒 🟒 🟒 🟒 🟒 βœ…
      zip 🟒 🟒 🟒 🟒 🟒
      zmq 🟒 🟒 🟒 🟒 🟒
      zstd 🟒 🟒 🟒 🟒 πŸ”΄ βœ…

Development setup

Since the scripts are very restrictive with the integrity check and do not allow any changes to the code β€” modified modules are immediately deleted and replaced by the module server β€” I have integrated a local module server that allows anyone to host the modules on their own localhost independently of any outside web server. If the scripts are built that way, the local module server starts and stops together with the script and takes over the provision of the modules.

The config/configure file is already set up to build the scripts with the local web server.

These are the steps to build:

# Be sure to cleanup older builds
sudo make clean

# Be sure to perform a pull beforehand to get the latest version.
git pull origin main

sudo make and-install-all-scripts
sudo make modules
sudo make sign-and-release-all-modules

That way, the modules will be served with their hashes, so they are protected against changes. Therefore, you have to make any desired changes before you build them.

I hope you enjoy it a lot!

ernolf

About

ernolfs bash tool box - scripts for nextcloud admins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published