#!/bin/bash

## Copyright (C) 2022 - 2023 ENCRYPTED SUPPORT LP <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 -e

true "INFO $0: START"

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

## Not using exec to be able to see this script in "ps aux".
sudo -u sdwdate /usr/libexec/sdwdate/sdwdate

true "INFO $0: END"
