srv/scripts/cron-remove-inactive-users.lisp
Circling Skies 2b5a21310a Makes lots of changes. (See full log.)
- Converts Makefile to UNIX line termination.

Makefiles cannot be formatted with DOS CRLF because, otherwise, we
could not escape \n to continue on a second line.  We end up escaping
\r and not \n.

- Fixes remove-account!

Procedure delete-if ``may modify sequence'', but we cannot be sure it
will modify it.  There are cases in which it does and there are cases
in which it doesn't.  Seeing it did modify in one case, I incorrectly
assumed it would modify in all cases---such is life.  Since I do want
to modify it always, I wrote delete-if*, which in calls setf to be
sure the list is overwritten.

- Avoids (load'ing "~/.sbclrc") and, instead, does what Quicklisp does.

It's not always the case that ~/.sbclrc exists.  But Quicklisp in each
installation knows what to do.  So we do what Quicklisp does in each
script that we use.

- Frees us from using sb-ext:{file-exists,file-does-not-exist}

Turns out SBCL 1.2.4.debian doesn't have these symbols.

- Adds command-line parsing.
- Adds install target to Makefile.
- Rewrites Makefile with a new strategy.
- Adds the daemon-tls/ service example.
- Adds the daemon service example.
- Convers all text files to LF instead of CRLF.
2024-12-12 13:21:43 -03:00

11 lines
348 B
Common Lisp

#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(ql:quickload :loop :silent t)
(in-package #:loop)
(read-accounts!)
(connect-index! "message-id.db")
(remove-inactive-users!)
(write-accounts!)