π Hoofdstuk 26.2: Scripts draaien zonder een console
ββββββββββββββββββββββββββββββ
π Wat is nohup?
ββββββββββββββββββββββββββββββ
β’ nohup staat voor "no hangup".
β’ Het voorkomt dat een script wordt beΓ«indigd wanneer je de terminal afsluit of uitlogt.
β’ Voorkomt dat het script stopt door het SIGHUP-signaal (hangup).
Typische syntax:
nohup ./script.sh &
ββββββββββββββββββββββββββββββ
π Output naar nohup.out
ββββββββββββββββββββββββββββββ
β’ Omdat de terminal niet beschikbaar is voor uitvoer, schrijft nohup standaard naar:
nohup.out
β’ Dit bestand wordt automatisch aangemaakt in de huidige directory.
β οΈ Let op:
β’ Bij meerdere nohup-scripts komt alle output in hetzelfde bestand β kan onoverzichtelijk worden.
Bekijk de output met:
cat nohup.out