Tip: Shell/profile configuration for Mystic BBS
From
Zip@21:1/202 to
All on Saturday, August 24, 2019 09:53:57
Hello everyone!
Just thought I'd share a short shell snippet from my system wide /etc/profile.d/local.sh on my Debian 10 ("Buster") system:
# CUSTOM: Mystic BBS
[ -r /home/bbs/mystic/mystic.dat ] && [ -w /home/bbs/mystic/mystic.dat ] && export mysticbbs=/home/bbs/mystic
[ -x /home/bbs/mystic/mystic ] && export PATH="${PATH:+${PATH}:}/home/bbs/mystic"
[ -d /home/bbs/cryptlib ] && export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}/home/bbs/cryptlib"
(You will of course have to change the paths to match your installation.)
It checks if the Mystic BBS configuration file "mystic.dat" is both readable and writable by the current user, and, if so, sets the "mysticbbs"
environment variable so that [at least some of] the Mystic BBS utilities can find "mystic.dat" regardless of where you are standing, and adds the Mystic
BBS installation directory to the PATH so that you (again) don't have to go there in order to run the utilities.
By performing these checks, this can be placed system wide, allowing (e.g.) multiple users to configure the Mystic BBS installation (of course provided that they have read/write access to all needed files, e.g. are part of a
common BBS group). Otherwise it would have to go in users' private
~/.profile or ~/.bash_profile files instead.
Some of the ${...} variable stuff might require a rather recent bash (Debian 10, for instance, ships with bash 5.0) -- I think they changed the syntax of that a while back...
Best regards
Zip
--- Mystic BBS v1.12 A43 2019/03/02 (Linux/64)
* Origin: Star Collision BBS, Uppsala, Sweden (21:1/202)