205 lines
4.9 KiB
Plaintext
205 lines
4.9 KiB
Plaintext
# This is a sample dgamelaunch configuration file. Only bash-style comments
|
|
# are allowed, such as this. Each configuration option will be explained
|
|
# along with its default value.
|
|
|
|
|
|
|
|
# Global config variables:
|
|
|
|
|
|
# Max amount of registered users to allow.
|
|
maxusers = 64000
|
|
|
|
# Allow registration of new nicks? (0 or 1)
|
|
allow_new_nicks = 1
|
|
|
|
# Max length for newly registered nicks. Must be less than 20.
|
|
# By default, NetHack only stores the first 10 chars of a name into
|
|
# the record/logfile.
|
|
maxnicklen = 10
|
|
|
|
# Path to a prepared chroot jail.
|
|
chroot_path = "/var/lib/dgamelaunch/"
|
|
|
|
# From inside the jail, dgamelaunch's working directory for rcfiles/ttyrec/etc
|
|
dglroot = "/dgldir/"
|
|
|
|
# From inside the jail, location of a banner file that contains no more than
|
|
# 14 lines of 80-column width text. Any more will be truncated.
|
|
banner = "/dgl-banner"
|
|
|
|
# The following two options are fairly insecure. They will force us to
|
|
# load the password/group database into memory while still having root
|
|
# privileges. Replace them with shed_uid/shed_gid entries as soon as
|
|
# possible if you decide to use them. dgamelaunch will inform you of
|
|
# the uids/gids corresponding to your choices when it loads.
|
|
#
|
|
# Note that shed_uid and shed_gid will always take precedence over
|
|
# shed_user and shed_group if they are specified.
|
|
|
|
# shed_user: username to shed privileges to
|
|
#shed_user = "games"
|
|
# shed_group: group name to shed privileges to
|
|
#shed_group = "games"
|
|
|
|
# Preferably, you may use the respective gids/uids. This is for Debian:
|
|
shed_uid = 5
|
|
shed_gid = 60
|
|
|
|
# The defaults are usually just fine for this. passwd refers to the file
|
|
# that stores the user database, and lockfile is only used internally by
|
|
# dgamelaunch.
|
|
|
|
passwd = "/dgl-login"
|
|
lockfile = "/dgl-lock"
|
|
|
|
|
|
#
|
|
# define some commands that are run when something happens. format is
|
|
# commands [ <time> ] = <command> ...
|
|
#
|
|
# <time> can be one of:
|
|
# login = when user logs in
|
|
# dglstart = when someone telnets in
|
|
# register = when a new user is registered
|
|
# gamestart = when a game is started
|
|
#
|
|
# <command> is:
|
|
# mkdir "foo" = creates a directory "foo"
|
|
# chdir "foo" = changes current work dir to "foo"
|
|
# cp "foo" "bar" = copies file "foo" to "bar"
|
|
# unlink "foo" = deletes file "foo"
|
|
# setenv "foo "bar" = sets environment variable "foo" to "bar"
|
|
#
|
|
# eg. commands[login] = mkdir "foo", unlink "bar", setenv "Z" "foo"
|
|
#
|
|
|
|
# create the user's ttyrec dir when they register
|
|
commands[register] = cmdmkdir "%rttyrec/%n"
|
|
|
|
|
|
|
|
|
|
|
|
# Next, we'll define one game's data:
|
|
|
|
DEFINE {
|
|
|
|
# From inside the jail, the location of the binary to be launched.
|
|
game_path = "/bin/nethackstub"
|
|
|
|
# Full name of the game
|
|
game_name = "NetHack stub"
|
|
|
|
# Short name, used in the watching menu
|
|
short_name = "NHstb"
|
|
|
|
# arguments for when we exec the binary
|
|
game_args = "/bin/nethackstub",
|
|
"foo",
|
|
"user:%n",
|
|
"shed_uid:%u",
|
|
"bar"
|
|
|
|
# From inside the jail, where dgamelaunch should put mail - should match up with
|
|
# NetHack settings.
|
|
spooldir = "/var/mail/"
|
|
|
|
# From inside the jail, the default .nethackrc that is copied for new users.
|
|
# rc_template = "/dgl-default-rcfile"
|
|
|
|
# make sure the inprogress dir actually exists. default is "inprogress/"
|
|
# each game you define here must have it's own.
|
|
inprogressdir = "inprogress-nethackstub/"
|
|
|
|
# We can also define per-game commands, that are executed
|
|
# when teh game starts:
|
|
# commands = chdir "/dgldir", mkdir "foo_%u_%g"
|
|
|
|
}
|
|
|
|
|
|
#
|
|
# the second game
|
|
#
|
|
#
|
|
|
|
DEFINE {
|
|
|
|
game_path = "/bin/nethack"
|
|
game_name = "NetHack 3.4.3"
|
|
short_name = "NH343"
|
|
|
|
game_args = "/bin/nethack", "-u", "%n"
|
|
|
|
spooldir = "/var/mail/"
|
|
rc_template = "/dgl-default-rcfile"
|
|
# format where player rc files are saved.
|
|
# %r == dglroot
|
|
# %n == user name
|
|
rc_fmt = "%rrcfiles/%n.nethackrc"
|
|
|
|
inprogressdir = "inprogress-nethack/"
|
|
|
|
# back up savefile
|
|
commands = cp "/var/games/nethack/save/%u%n.gz" "/var/games/nethack/save/%u%n.gz.bak",
|
|
# set NETHACKOPTIONS to point to the rcfile
|
|
setenv "NETHACKOPTIONS" "@%rrcfiles/%n.nethackrc",
|
|
# set up nethack mail stuff
|
|
setenv "MAIL" "/var/mail/%n",
|
|
setenv "SIMPLEMAIL" "1",
|
|
# don't let the mail file grow
|
|
unlink "/var/mail/%n"
|
|
}
|
|
|
|
#
|
|
# third game
|
|
#
|
|
#
|
|
|
|
DEFINE {
|
|
|
|
game_path = "/bin/crawlss017"
|
|
game_name = "Crawl Stone Soup 0.1.7"
|
|
short_name = "Cr017"
|
|
|
|
|
|
game_args = "/bin/crawlss017",
|
|
"-name", "%n",
|
|
"-dir", "/crawlss017/",
|
|
"-rc", "%rrcfiles/%n.crawlrc",
|
|
"-morgue", "/crawlss017/morgues/",
|
|
"-macro", "/crawlss017/macros/%n.macro"
|
|
|
|
|
|
rc_template = "/dgl-default-rcfile.crawl"
|
|
rc_fmt = "%rrcfiles/%n.crawlrc"
|
|
inprogressdir = "inprogress-crawlss017/"
|
|
|
|
}
|
|
|
|
#
|
|
# fourth game
|
|
#
|
|
#
|
|
|
|
DEFINE {
|
|
|
|
game_path = "/bin/crawlss020"
|
|
game_name = "Crawl Stone Soup 0.2.0"
|
|
short_name = "Cr020"
|
|
|
|
|
|
game_args = "/bin/crawlss020",
|
|
"-name", "%n",
|
|
"-dir", "/crawlss020/",
|
|
"-rc", "/crawlss020/plr/%n/%n.crawlrc",
|
|
"-morgue", "/crawlss020/plr/%n/",
|
|
"-macro", "/crawlss020/plr/%n/"
|
|
|
|
rc_template = "/dgl-default-rcfile.crawl"
|
|
rc_fmt = "/crawlss020/plr/%n/%n.crawlrc"
|
|
inprogressdir = "inprogress-crawlss020/"
|
|
|
|
}
|