Best way to customize OMV after an update ? Salt/Script/?

  • Hi,

    After each OMV update, I would like to run some commands automatically... not something very complicated, like re-set my dark web theme and the graph size in OMV stats pages for example.

    This could be done with those CLI commands :


    Code
    # Dark OMV theme
    cd /var/www/openmediavault/css; cp defaults.sav defaults.scss
    make all; chown openmediavault-webgui:openmediavault-webgui *; chmod 664 *;
    
    
    # OMV Graphs
    sed -i 's/400/1400/' /usr/sbin/omv-mkrrdgraph; sed -i 's/120/200/' /usr/sbin/omv-mkrrdgraph;


    So... Should I stay with a script that I have to manually run after each upgrade, or is there a nice way to automatically execute those commands after each update (salt ?).

    Any idea is welcome... ;)

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    4 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.23 & Linux kernel 5.10.x

    Edited once, last by sbocquet ().

  • Hi,

    That's not when rebooting, but after each 'apt upgrade' of openmediavault package...
    At the moment, I'm investigating the post-invoke option of APT, but I'm a little lost. I need to learn more on the subject...

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    4 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.23 & Linux kernel 5.10.x

  • Sorry, the OMV SaltStack infrastructure does not provide that feature at the moment. I'll implement this for OMV6 asap.

    No problem, I think that post invoke scripts will do the job just fine.
    I just don't know if I can aim a specific package in order to not run those scripts at every other package update.

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    4 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.23 & Linux kernel 5.10.x

  • Scripts done... will see next upgrade ;)

    Lian Li PC-V354 (with Be Quiet! Silent Wings 3 fans)
    ASRock Rack x470D4U | AMD Ryzen 5 3600 | Crucial 16GB DDR4 2666MHz ECC | Intel x550T2 10Gb NIC

    1 x ADATA 8200 Pro 256MB NVMe for System/Caches/Logs/Downloads
    4 x Western Digital 10To HDD in RAID 6 for Datas
    1 x Western Digital 2To HDD for Backups

    Powered by OMV v5.6.23 & Linux kernel 5.10.x

  • sbocquet

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!