Run script, systemctl hook after a UI config change

  • Hi, my use case is quite simple. Before switching to openmediavault I was running a home NAS/media server on ArchLinux.
    I boot without mounting a main storage and then I run a simple script

    Code
    # import map_luks - "expect's" script.
    
    map_luks /dev/mapper/vg0-home home $pass 1> /dev/null 
    mount /home
    systemctl restart transmission smb nmb syncthing@sync.service

    The thing is that I didn't want to start some services without decrypting a given partiton.
    2 questions:

    - do you have a plan to support a similar use case in newer releases

    - how can I achieve a similar behaviour, e.g. by login to a shell and running a custom script that would change coning (decrypt & mount partition) and restart some services.

    • Official Post

    any update regarding this thread?

    I would suggest auto unlocking the correct way using crypttab - https://www.howtoforge.com/aut…ted-drives-with-a-keyfile Then if your services are still starting too soon, add a systemd unit override specifically telling the service to wait for the filesystem.

    omv 7.4.14-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.15 | compose 7.2.16 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Participate now!

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