mirror of
https://github.com/GRFreire/nthmail.git
synced 2026-01-09 21:09:39 +00:00
12 lines
192 B
Bash
Executable File
12 lines
192 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -z "$DB_PATH" ]; then
|
|
DB_PATH="db.db"
|
|
fi
|
|
|
|
min_date="$(date -d '-1 day' +%s)"
|
|
sql="DELETE FROM mails WHERE mails.arrived_at < $min_date;"
|
|
|
|
echo "$sql" | sqlite3 "$DB_PATH"
|
|
|