1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
if [ -L /var/lib/systemd/timesync ]; then rm /var/lib/systemd/timesync mv /var/lib/private/systemd/timesync /var/lib/systemd/timesync fi if [ -f /var/lib/systemd/clock ] ; then mkdir -p /var/lib/systemd/timesync mv /var/lib/systemd/clock /var/lib/systemd/timesync/ fi if sd_booted; then systemctl daemon-reload if [ $1 -eq 1 ]; then # Initial installation systemctl --no-reload preset systemd-timesyncd.service || : else # Package upgrade, not uninstall /lib/systemd/systemd-update-helper mark-restart-system-units systemd-timesyncd.service || : fi fi
1 2 3
groupadd -r -f systemd-timesync >/dev/null 2>&1 ||: useradd -g systemd-timesync -c 'systemd Time Synchronization' \ -d /var/empty -s /dev/null -r -l -M systemd-timesync >/dev/null 2>&1 ||:
1 2 3 4 5
if [ $1 -eq 0 ] && sd_booted; then # Package removal, not upgrade /lib/systemd/systemd-update-helper remove-system-units systemd-timesyncd.service || : fi