or even better I think:
#!/bin/sh # trim all mounted file systems which support it +if /usr/bin/systemd-detect-virt -q -c; then +exit 0 +fi /sbin/fstrim --all || true
or even better I think:
#!/bin/sh systemd- detect- virt -q -c; then
# trim all mounted file systems which support it
+if /usr/bin/
+exit 0
+fi
/sbin/fstrim --all || true