Submit
Path:
~
/
/
opt
/
psa
/
admin
/
sbin
/
modules
/
ntp-timesync
/
File Content:
ntp-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="$(ntpq -pn4 | grep -q '^+\|^o')" err=$? if [[ $err == 0 ]]; then echo "true" fi echo "ntpd client execution failed with non-zero exit code, stderr: ${status}" >&2 exit "$err" } main() { case "$1" in syncing) is_syncing ;; enable) enable "${2:-"ntpd"}" ;; disable) disable "${2:-"ntpd"}" ;; *) echo "Unknown command ${1}" >&2 exit 1 esac } main "$@"
Edit
Rename
Chmod
Delete
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