mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-29 21:01:42 +08:00
23 lines
596 B
Bash
23 lines
596 B
Bash
#!/bin/sh
|
|
[ ! -f "/usr/share/ucitrack/luci-app-timecontrol.json" ] && {
|
|
cat > /usr/share/ucitrack/luci-app-timecontrol.json << EEOF
|
|
{
|
|
"config": "timecontrol",
|
|
"init": "timecontrol"
|
|
}
|
|
EEOF
|
|
}
|
|
chmod +x /etc/init.d/timecontrol /usr/bin/timecontrol* /usr/libexec/timecontrol-call
|
|
uci -q batch <<-EOF >/dev/null
|
|
delete ucitrack.@timecontrol[-1]
|
|
add ucitrack timecontrol
|
|
set ucitrack.@timecontrol[-1].init=timecontrol
|
|
commit ucitrack
|
|
EOF
|
|
|
|
[ -s /etc/config/timecontrol ] || echo "config timecontrol" > /etc/config/timecontrol
|
|
|
|
/etc/init.d/rpcd restart
|
|
rm -f /tmp/luci-indexcache
|
|
exit 0
|