#!/bin/bash

## Copyright (C) 2022 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

## The systemd unit file /lib/systemd/system/sdwdate.service does not use this
## script. It starts /usr/libexec/sdwdate/sdwdate directly.

set -x

set -o errexit
set -o nounset
set -o pipefail
set -o errtrace
shopt -s inherit_errexit
shopt -s shift_verbose

true "INFO $0: START"

printf '%s\n' "WARNING: Starting sdwdate from command line by the user is unsupported, for more information, see:"
printf '%s\n' "https://www.kicksecure.com/wiki/Dev/sdwdate#sdwdate_linux_user_account"

## Not using exec to be able to see this script in "ps aux".
leaprun sdwdate-libexec

true "INFO $0: END"
