SAFE_ASTERISK(8)
π SAFE_ASTERISK π
okay so bestie, gather round, because this one is the manual page for safe_asterisk β a lil wrapper script from the Linux Programmer's Manual that runs the asterisk executable in a loop. she's simple, she's loyal, she's keeping your PBX alive at 3am. π«Ά
β¨ SYNOPSIS β¨
safe_asterisk [ asterisk_params ]
πΈ DESCRIPTION πΈ
so safe_asterisk is a script that runs asterisk in a loop, which is genuinely so useful if you're sitting there lowkey fearing that asterisk may crash. it's giving "helicopter parent but make it daemon-adjacent." π
ngl, the script does not run in the background like a standard service. no ma'am. instead, it runs in its own linux virtual console (9, by default). she needs her own room. β¨
it also uses the option -c of asterisk(8) to avoid detaching asterisk from that terminal β so asterisk stays right there on the console with her, holding hands. π₯°
safe_asterisk also runs asterisk with unlimited core file size, and thus asterisk will dump core in case of a crash. so when things go wrong, there's a whole receipt. no cap. πΈ
to get a "picture" of console 9, from another terminal (e.g: from a remote shell session) you can use:
screendump 9
the init script of the Debian package should be able to run safe_asterisk as the asterisk service, if so configured. see comments in /etc/default/asterisk β the answers are literally right there, iykyk. π
π FILES π
/tmpβsafe_asteriskruns in that directory, rather than in/as usual. she moved out, she's got her own place now. π¦/tmp/coreβ if core files were generated there, they may be/etc/asterisk/startup.dβ files in this directory will be'source'dby thesafe_asteriskscript before it starts Asterisk proper, allowing them to set additional environment variables or run any other steps that are needed for your system. it's the pregame before the main character moment. π
π BUGS π
- while showing the output on a console is useful, using
screen(1)as the terminal may be better. just saying. π - the script does not read configuration from standard location under
/etc. she does her own thing. - it uses fixed locations under
/tmp, and thus may be exposed to a symlink attacks. π¨
bestie be careful β fixed paths in /tmp means symlink attacks are lowkey on the table. not a vibe, but forewarned is forearmed. π
β SEE ALSO β
asterisk(8)screendump(9)
π AUTHOR π
this manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com> β permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. slay, honestly.
on Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2. π
and that's the whole thing, bestie! this page came to you from the Asterisk crew, dated Jun 30th, 2005 β a true vintage icon, still serving looks in the Linux Programmer's Manual. mwah. πβ¨π
π¦ where this page comes from
- alpine 3.22: asterisk-doc 20.11.1-r6 Β· GPL-2.0-only WITH OpenSSL-Exception
- alpine 3.23: asterisk-doc 20.15.2-r1 Β· GPL-2.0-only WITH OpenSSL-Exception
- alpine 3.24: asterisk-doc 22.9.0-r0 Β· GPL-2.0-only WITH OpenSSL-Exception
- epel 9: asterisk 18.26.4-1.el9 Β· GPL-2.0-only
- fedora 43: asterisk 18.12.1-1.fc43.15 Β· GPL-2.0-only
- fedora 43: asterisk 18.12.1-1.fc43.15 Β· GPL-2.0-only
- fedora 43: asterisk 18.26.4-1.fc43 Β· GPL-2.0-only
- fedora 43: asterisk 18.26.4-1.fc43 Β· GPL-2.0-only
- fedora 44: asterisk 18.12.1-1.fc44.17 Β· GPL-2.0-only
- fedora 44: asterisk 18.12.1-1.fc44.17 Β· GPL-2.0-only
- fedora 44: asterisk 18.26.4-1.fc44 Β· GPL-2.0-only
- fedora 44: asterisk 18.26.4-1.fc44 Β· GPL-2.0-only
- nixos 26.05: asterisk 23.5.0
- nixos 26.05: asterisk-ldap 22.11.0
- nixpkgs unstable: asterisk 23.5.0
- nixpkgs unstable: asterisk-ldap 22.11.0
- ubuntu jammy: asterisk 1:18.10.0~dfsg+~cs6.10.40431411-2 Β· GPL-2-Asterisk
- ubuntu noble: asterisk 1:20.6.0~dfsg+~cs6.13.40431414-2build5 Β· GPL-2-Asterisk
- ubuntu resolute: asterisk 1:22.5.2~dfsg+~cs6.15.60671435-1 Β· GPL-2-Asterisk
- ubuntu stonking: asterisk 1:22.10.0+dfsg+~cs6.17.60671434-1ubuntu3 Β· GPL-2-Asterisk
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms