update 2026-08-17 16:36:08

This commit is contained in:
action committed 2026-08-17 16:36:08 +08:00
1 parent 15f9ec83ad
commit 742209e24d
1969 files changed
+103 -1523162

No files matched your search

+13 -2
View File
@@ -218,16 +218,25 @@ start_service() {
procd_close_instance
# cron
local reload_cron; reload_cron=0
## clear cron
if grep -q "#momo" "/etc/crontabs/root"; then
log "App" "Clear cron."
sed -i "/#momo/d" "/etc/crontabs/root" > /dev/null 2>&1
reload_cron=1
fi
## add restart cron if needed
if [ "$scheduled_restart" = 1 ] && [ -n "$scheduled_restart_cron" ]; then
log "App" "Set scheduled restart."
echo "$scheduled_restart_cron /etc/init.d/momo restart #momo scheduled restart" >> "/etc/crontabs/root"
reload_cron=1
fi
## add log scheduled clear cron if needed
if [ "$log_scheduled_clear" = 1 ] && [ -n "$log_scheduled_clear_cron" ]; then
log "App" "Set log scheduled clear."
echo "$log_scheduled_clear_cron /etc/init.d/momo clear_logs #momo log scheduled clear" >> "/etc/crontabs/root"
reload_cron=1
fi
## reload cron if needed
if [ "$reload_cron" = 1 ]; then
/etc/init.d/cron restart
fi
@@ -440,8 +449,10 @@ cleanup() {
sysctl -q -w net.bridge.bridge-nf-call-ip6tables=1
fi
# delete cron
sed -i "/#momo/d" "/etc/crontabs/root" > /dev/null 2>&1
/etc/init.d/cron restart
if grep -q "#momo" "/etc/crontabs/root"; then
sed -i "/#momo/d" "/etc/crontabs/root" > /dev/null 2>&1
/etc/init.d/cron restart
fi
}
clear_logs() {