Closed WilliamMcCumstie closed 3 years ago
I've rebased onto latest master
and made a few changes.
post-verify
hook is now only called when a type transitions from unverified
-> verified
. The hook can be relied onto to indicate that there has been a change in verification of desktop types.The changes look good in principle, just have one comment
- The
post-verify
hook is now only called when a type transitions fromunverified
->verified
. The hook can be relied onto to indicate that there has been a change in verification of desktop types.
Running post-verify
after a change of state looks good, but it also needs to be ran if a type transitions from verified
-> unverified
.
Currently the post-verify
hook is only used to restart the desktop-restapi
, so the direction of the transition (verified
<-> unverified
) does not matter. This can be revisited if an when the direction becomes important.
Running
post-verify
after a change of state looks good, but it also needs to be ran if a type transitions fromverified
->unverified
.
Yeah I mentioned that in the https://github.com/openflighthpc/flight-desktop/commit/1431cc1bf9a4ff36ec537909d5333aaf011be76f commit message. I was of the conclusion that it wasn't likely enough to be worth implementing. But on reflection it makes sense to do so now, whilst working on this. Thanks @WilliamMcCumstie
The new hooks directory supports optional
post-verify
scripts. This is to allowflight-desktop-restapi
to be reloaded each time a new desktop is verified.These scripts use the existing
run_script
infrastructure which execute through abash
shell. This means they do not needexecute
permissions. Some form of "admin only" scripts are required as not all users can restart thedesktop-restapi
service. This is achieve by checking if the user asread
permission to the file.