mirror of
https://github.com/D-Modem/login.git
synced 2026-11-28 20:38:06 -08:00
A Go program that D-Modem-RE's app_dmodem runs as a mode = exec profile
on the caller's line: it asks for a user name and password, checks them
with a text file, LDAP (bind as the user, directly or after a search) or
an SQL database (MySQL/MariaDB, PostgreSQL, SQLite), then offers a menu
of a BBS, PPP and a shell. The selection gets the user name, password,
the backend that accepted them, the dialed number, caller ID, connect
rate and the connection's date and time: as MODEM_* in its environment,
as shell-quoted {placeholders} in its command, in an optional 0600
session file, in the rlogin handshake (the way BBSs log a caller in), or
sent after connecting to a raw TCP or telnet server.
Moved here from D-Modem-RE's modemmenu/.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
32 lines
771 B
Makefile
32 lines
771 B
Makefile
# modemmenu: the login and menu of a dial-up line (Go 1.22 or later)
|
|
#
|
|
# make build
|
|
# make test the tests
|
|
# make install into $(BINDIR), samples into $(CONF_DIR)
|
|
|
|
GO ?= go
|
|
BINDIR ?= /usr/local/bin
|
|
CONF_DIR ?= /etc/asterisk
|
|
|
|
all: modemmenu
|
|
|
|
modemmenu: FORCE
|
|
$(GO) build -o $@ .
|
|
|
|
test:
|
|
$(GO) vet ./...
|
|
$(GO) test ./...
|
|
|
|
install: modemmenu
|
|
install -D -m 755 modemmenu $(DESTDIR)$(BINDIR)/modemmenu
|
|
[ -e $(DESTDIR)$(CONF_DIR)/modemmenu.conf ] || \
|
|
install -D -m 640 modemmenu.conf.sample $(DESTDIR)$(CONF_DIR)/modemmenu.conf
|
|
[ -e $(DESTDIR)$(CONF_DIR)/modemmenu.users ] || \
|
|
install -D -m 600 modemmenu.users.sample $(DESTDIR)$(CONF_DIR)/modemmenu.users
|
|
|
|
clean:
|
|
rm -f modemmenu
|
|
|
|
FORCE:
|
|
.PHONY: all test install clean FORCE
|