aboutsummaryrefslogtreecommitdiff
#!/bin/sh

# https://stackoverflow.com/questions/2990414/echo-that-outputs-to-stderr
errcho(){ >&2 echo "$@"; }

# run this script as root, once, at installation
if id -u 0tdns > /dev/null 2>&1; then
    errcho "User 0tdns already exists."
    errcho "Do you have Zero Trust DNS already set up?"
    errcho "If so, you need to uninstall it properly"
    errcho "(e.g. via provided uninstall.sh script)"
    errcho "before setting it up again"
    exit 1
fi

if [ `id -u` != 0 ]; then
    errcho "This script needs to be run as root"
    exit 1
fi

# part of the program running inside network namespace
# will run under this user
useradd --system 0tdns

# crontab automatically adds a 'DO NOT EDIT' header to
# crontab file; if we don't remove it every time - headers
# will accumulate :/ (not on Debian, though)
# line we want to add to crontab is in 0tdns_crontab file
crontab -l 2> /dev/null |
    grep -vE '^# DO NOT EDIT THIS FILE|^# \(- installed on .*\)|^# \(Cron version .*\)' |
    cat - 0tdns_crontab | crontab
Julien Lepiller 2023-02-26nls: Fix more Texinfo Italiano....Tobias Geerinckx-Rice 2023-02-26nls: Fix typo in Italian translation....Tobias Geerinckx-Rice 2023-02-03gnu: Remove key-mon.scm....Julien Lepiller 2023-01-05nls: Update translations....Julien Lepiller 2022-12-15doc: Use VM image file name consistently....Ludovic Courtès 2022-12-04nls: Update translations....Julien Lepiller 2022-11-20scripts: Use translations for guix.pot for service descriptions....pelzflorian (Florian Pelz) 2022-11-15installer: Report known-unsupported PCI devices....Ludovic Courtès 2022-11-04nls: Update translations....Julien Lepiller 2022-10-08po: Fix syntax error in French translation....Ricardo Wurmus 2022-10-08po: Fix syntax error in German translation....Ricardo Wurmus 2022-10-06nls: Update translations.Julien Lepiller 2022-10-06services: dhcp-client: Implement and use a configuration record....Alexey Abramov 2022-09-24services: Add samba service....Simon Streit 2022-09-04nls: Update translations.Julien Lepiller 2022-08-16ui: Describe package outputs....Liliana Marie Prikler 2022-08-11po: Add 'guix/read-print.scm'....Ludovic Courtès 2022-08-10nls: Update translations....Julien Lepiller 2022-07-09nls: Update translations....Julien Lepiller 2022-06-24services: configuration: Report the location of field type errors....Ludovic Courtès 2022-06-17home: Add OpenSSH service....Ludovic Courtès 2022-06-04nls: Update translations....Julien Lepiller 2022-06-04guix home: Add 'edit' sub-command....Ludovic Courtès 2022-06-04guix system: Add 'edit' sub-command....Ludovic Courtès 2022-05-01nls: Update translations....Julien Lepiller 2022-04-02nls: Update translations....Julien Lepiller 2022-04-02nls: Enforce translation thresholds....Julien Lepiller 2022-03-18graph: Factorize 'lookup-backend'....Ludovic Courtès 2022-03-01nls: Update translations....Julien Lepiller 2022-02-04nls: Update translations....Julien Lepiller 2022-01-09nls: Update translations....Julien Lepiller 2022-01-03home: services: Make strings in Gexps translateble....Xinglu Chen 2021-12-10Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe 2021-12-08nls: Update 'es' translation.Julien Lepiller 2021-12-05Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus 2021-12-04nls: Update translations.Julien Lepiller 2021-11-08Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner 2021-11-06nls: Update translations....Julien Lepiller 2021-10-31Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner 2021-10-25Add 'guix shell'....Ludovic Courtès 2021-10-18Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe 2021-10-17nls: Update translations.Julien Lepiller 2021-10-12Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe 2021-10-01po: Update POTFILES.in....Julien Lepiller