APTITUDE-ROBOT-SESSION(8)

πŸ“¦
version 1.5.5 Β· 4 versions
, in debian bookworm, ubuntu noble

πŸ’– aptitude-robot-session(8) πŸ’–

okay bestie, so this is a User Commands page from section 8 of the manual, and it's all about aptitude-robot-session β€” the little helper script that runs your robot bestie without anybody needing to babysit it. no cap, it's giving "set it and forget it" energy. πŸ¦‹


✨ NAME ✨

aptitude-robot-session β€” call aptitude-robot non-interactively πŸ’…


🌸 SYNOPSIS 🌸

aptitude-robot-session

that's it. that's the whole vibe. no flags, no arguments, just send it. πŸŽ€


πŸ‘‘ DESCRIPTION πŸ‘‘

aptitude-robot-session is a helper script, and its whole personality is "meant to be run from cron or init scripts." literally, that's the assignment. 🫢

when it runs, it calls aptitude-robot with some options that are suitable for non-interactive use β€” because nobody's there to answer questions, bestie, and the robot knows that.

it also redirects all output (STDERR and STDOUT, both of them, the whole package πŸ’€) to LOGFILE, which is defined in /etc/default/aptitude-robot.


πŸŽ€ CONFIGURATION πŸŽ€

there are a few configuration options you can define in /etc/default/aptitude-robot. here's the lineup:

  • LOGFILE β€” the name of the file where all the output of aptitude-robot gets collected. defaults to /var/log/aptitude-robot.log ✨
  • LOG_SESSION β€” the name of the file where the session log is accumulated. aptitude-robot-session will append its PID to this file so it does not overwrite a log file left over from a crashed earlier invocation. if aptitude-robot-session finishes properly, it will append the session log to LOGFILE and delete the session log. clean up, clean up 🧚
  • SESSION_REPORT_COMMAND β€” an optional command, invoked with the session log as the only argument at the end of an aptitude-robot-session run. use it to file reports to monitoring systems or support mail addresses. very main character of you πŸ’…
  • MAX_LOGFILES_SIZE_BLOCKS β€” file size limit in blocks for the session log. this prevents endless loops if a package installation keeps asking the same question for which no terminal is available to provide an answer. 😭
but be aware that this limit also affects _all_ daemons started or restarted during the aptitude-robot-session run, including e.g. the OpenSSH daemon β€” which again will propagate the limit to its remote login sessions. use with care. πŸ‘€
  • POST_SESSION_HOOK β€” a command that is run at the end of a successful aptitude-robot-session. e.g., use it for apt-get clean. little treat at the end πŸ“

⭐ EXIT STATUS ⭐

  • aptitude-robot-session exits with 0 on success πŸŽ‰
  • 1 if dpkg is locked πŸ”’
  • 2 if apt failed to fetch some APT repositories πŸ˜”

πŸ’€ BUGS πŸ’€

the non-interactive nature of aptitude-robot-session may trigger the condition reported in https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/257279

yeah. it's a known thing. go read the bug, iykyk πŸ™ˆ


🌈 SEE ALSO 🌈

aptitude-robot(8), aptitude(8)

go read those too, they're iconic πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

Elmar S. Heeb <elmar@heebs.ch> and Axel Beckert <abe@debian.org>


that's the whole page bestie!! πŸ’– this was version 1.5.5, dated 2023-03-01, and you just read APTITUDE-ROBOT-SESSION(8) β€” slay, you're officially caught up. periodt. βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from