Skip to content

Commit

Permalink
show vmid and check file existence in xargs
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky committed Jan 18, 2024
1 parent d25441c commit b69d152
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/traps.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ See [2023 年 1 月 28 日工作记录](./records/2023-01-28.md).
```console
# pct list | awk '$2=="running"{print $1}' | xargs -I xxx pct exec xxx -- systemctl disable man-db.timer
# pct list | awk '$2=="running"{print $1}' | xargs -I xxx pct exec xxx -- systemctl disable apt-daily-upgrade.timer
# pct list | awk '$2=="running"{print $1}' | xargs -I xxx pct exec xxx -- bash -c 'mkdir -p /etc/systemd/system/logrotate.timer.d && echo -e "[Timer]\nRandomizedDelaySec=3h" > /etc/systemd/system/logrotate.timer.d/vlab.conf && systemctl daemon-reload'
# pct list | awk '$2=="running"{print $1}' | xargs -I xxx pct exec xxx -- bash -c 'echo xxx && [ ! -f "/etc/systemd/system/logrotate.timer.d/vlab.conf" ] && mkdir -p /etc/systemd/system/logrotate.timer.d && echo -e "[Timer]\nRandomizedDelaySec=3h" > /etc/systemd/system/logrotate.timer.d/vlab.conf && systemctl daemon-reload'
```

## Web 及用户界面
Expand Down

0 comments on commit b69d152

Please sign in to comment.