Rename to hkt.sh
This commit is contained in:
16
tmp/fix-nezha-clean.py
Normal file
16
tmp/fix-nezha-clean.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import yaml
|
||||
|
||||
lines = []
|
||||
with open("/tmp/nezha-config-raw.yaml") as f:
|
||||
for line in f:
|
||||
if not line.startswith("custom_code"):
|
||||
lines.append(line)
|
||||
|
||||
config = yaml.safe_load("".join(lines))
|
||||
|
||||
# 不加 custom_code,恢复默认
|
||||
|
||||
with open("/tmp/nezha-config-fixed.yaml", "w") as f:
|
||||
yaml.dump(config, f, allow_unicode=True, default_flow_style=False)
|
||||
|
||||
print("done")
|
||||
Reference in New Issue
Block a user