Submit
Path:
~
/
/
opt
/
psa
/
admin
/
sbin
/
modules
/
ntp-timesync
/
File Content:
chrony-mng.sh
#!/usr/bin/env bash ### Copyright 1999-2024. WebPros International GmbH. All rights reserved. enable() { systemctl enable --now "$1" && systemctl start "$1" exit $? } disable() { systemctl stop "$1" && systemctl disable "$1" exit $? } is_syncing() { local status err status="$(LANG=C.UTF-8 chronyc tracking 2>&1)" err=$? if [[ $err != 0 ]]; then echo "chrony client execution failed with non-zero exit code, stderr: ${status}" >&2 exit "$err" fi if grep "Leap status" <<<"$status" | grep -qE "Normal"; then echo "true" else echo "false" fi } main() { case "$1" in syncing) is_syncing ;; enable) enable "${2:-"chronyd"}" ;; disable) disable "${2:-"chronyd"}" ;; *) echo "Unknown command ${1}" >&2 exit 1 esac } main "$@"
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
chrony-mng.sh
931 bytes
0755
dbus-send.py
610 bytes
0755
ntp-mng.sh
806 bytes
0755
package-mng.sh
1652 bytes
0755
time-mng.sh
5638 bytes
0755
N4ST4R_ID | Naxtarrr