Skip to content

Commit 96e2d9d

Browse files
authored
feat(fstrim): support automatic shrink data disk (#62)
1 parent 9f7ed8e commit 96e2d9d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/sbin/openrc-run
2+
description="Run fstrim -v /var every 5 minutes"
3+
command="/bin/sh"
4+
command_args="-c 'while true; do fstrim -v /var; sleep 300; done'"
5+
command_background="true"
6+
pidfile="/run/${RC_SVCNAME}.pid"
7+
output_logger="/opt/logger_wrapper.sh stdout"
8+
error_logger="/opt/logger_wrapper.sh stdout"
9+
10+
depend() {
11+
after local
12+
}

layers/wsl2_amd64/opt/ovmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ main() {
264264
openrc default
265265
/sbin/rc-service kernelogger start
266266
/sbin/rc-service podman start
267+
/sbin/rc-service fstrim start
267268
}
268269
echo "main(): wait....."
269270
while true; do

0 commit comments

Comments
 (0)