Files
login/modemmenu.service.sample
T
Claude a5a55575af Unix sockets: modemmenu -serve, and items that connect to one
modemmenu -serve listens on [server] listen, a unix socket (or
tcp:host:port), for app_dmodem's mode = unix profiles: each connection
gets a session of its own, modemmenu on a new pty as mode = exec would
give it, so pppd, shells and ^C work the same.  A socket has no
environment: the call's details come first as a header, NAME=value
lines and an empty line (app_dmodem's header = yes).  socket_mode and
socket_group decide who may connect, max_sessions caps them, SIGTERM
hangs them all up and removes the socket.

Menu items reach other menu applications on unix sockets: mode = unix
(raw), or a path on tcp, telnet and rlogin items, and header = yes sends
the session ahead.  A modemmenu -serve with trust_user takes the user of
such a header as logged in, so a caller moves from one menu to another
without a second login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RvtV8Dg9kqRaakbTEfyH3f
2026-10-10 16:25:46 +00:00

19 lines
627 B
Plaintext

# /etc/systemd/system/modemmenu.service - modemmenu -serve for app_dmodem's
# mode = unix profiles (dmodem.conf: path = /run/modemmenu/modemmenu.sock,
# header = yes); [server] socket_group = asterisk lets Asterisk connect
[Unit]
Description=modemmenu: login and menu for dial-up callers
Before=asterisk.service
[Service]
ExecStart=/usr/local/bin/modemmenu -config /etc/asterisk/modemmenu.conf -serve
RuntimeDirectory=modemmenu
RuntimeDirectoryMode=0755
Restart=on-failure
# root for auth = system (PAM's pam_unix) and run_as; otherwise a user of
# its own, e.g. User=modemmenu
User=root
[Install]
WantedBy=multi-user.target