Update the example config file, and allow comment-lines in it to have
spaces or tabs before '#' git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@398 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
88adb16393
commit
d15a30cf3e
2
config.l
2
config.l
|
@ -19,8 +19,8 @@ NEGNUMBER -[0-9]+
|
|||
NUMBER [0-9]+
|
||||
VALUE \"[^"]*\"
|
||||
MALSTRING \"[^\"\n]*\n
|
||||
COMMENT ^[\t ]*#.*
|
||||
WHITE [\t ]*
|
||||
COMMENT ^#.*
|
||||
|
||||
%%
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
# 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.
|
||||
# along with its default value.
|
||||
|
||||
|
||||
|
||||
# Global config variables:
|
||||
|
||||
|
||||
# Max amount of registered users to allow.
|
||||
# Max amount of registered users to allow. Has no effect if dgl was
|
||||
# compiled with SQLite
|
||||
maxusers = 64000
|
||||
|
||||
# Allow registration of new nicks? (0 or 1)
|
||||
|
@ -26,9 +27,11 @@ 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.
|
||||
# The topmost line will be shown even in submenus.
|
||||
# string $VERSION will be replaced with dgl version number.
|
||||
banner = "/dgl-banner"
|
||||
|
||||
# The following two options are fairly insecure. They will force us to
|
||||
# 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
|
||||
|
@ -49,33 +52,41 @@ 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 doesn't matter if dgl was compiled with SQLite, as the name of
|
||||
# the sqlite database will be defined at compile time.
|
||||
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
|
||||
# login = when user has logged in
|
||||
# register = right after a new user is registered
|
||||
# gamestart = just before 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"
|
||||
# cp "foo" "bar" = copies file "foo" to "bar", overwriting previous "bar"
|
||||
# unlink "foo" = deletes file "foo"
|
||||
# setenv "foo "bar" = sets environment variable "foo" to "bar"
|
||||
#
|
||||
# The commands will be done inside the chroot and with the uid and gid
|
||||
# defined above.
|
||||
# Parameters to the commands are subject to variable substitution:
|
||||
# %r = dglroot, as defined above
|
||||
# %n = user nick, if user is logged in
|
||||
# %u = shed_uid, as defined above, but number
|
||||
# %g = game name, if user has selected a game.
|
||||
#
|
||||
# eg. commands[login] = mkdir "foo", unlink "bar", setenv "Z" "foo"
|
||||
#
|
||||
|
||||
# create the user's ttyrec dir when they register
|
||||
commands[register] = cmdmkdir "%rttyrec/%n"
|
||||
commands[register] = mkdir "%rttyrec/%n"
|
||||
|
||||
|
||||
|
||||
|
@ -84,38 +95,35 @@ 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"
|
||||
|
||||
# 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"
|
||||
|
||||
# Full name of the game
|
||||
game_name = "NetHack stub"
|
||||
# Short name, used in the watching menu
|
||||
short_name = "NHstb"
|
||||
|
||||
# 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"
|
||||
|
||||
# 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.
|
||||
spooldir = "/var/mail/"
|
||||
|
||||
# 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"
|
||||
|
||||
# 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"
|
||||
# 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 the game starts:
|
||||
# commands = chdir "/dgldir", mkdir "foo_%u_%g"
|
||||
}
|
||||
|
||||
|
||||
|
@ -125,31 +133,28 @@ inprogressdir = "inprogress-nethackstub/"
|
|||
#
|
||||
|
||||
DEFINE {
|
||||
game_path = "/bin/nethack"
|
||||
game_name = "NetHack 3.4.3"
|
||||
short_name = "NH343"
|
||||
|
||||
game_path = "/bin/nethack"
|
||||
game_name = "NetHack 3.4.3"
|
||||
short_name = "NH343"
|
||||
game_args = "/bin/nethack", "-u", "%n"
|
||||
|
||||
game_args = "/bin/nethack", "-u", "%n"
|
||||
spooldir = "/var/mail/"
|
||||
rc_template = "/dgl-default-rcfile"
|
||||
|
||||
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"
|
||||
rc_fmt = "%rrcfiles/%n.nethackrc"
|
||||
|
||||
inprogressdir = "inprogress-nethack/"
|
||||
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"
|
||||
# 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, assuming it's compiled with it...
|
||||
setenv "MAIL" "/var/mail/%n",
|
||||
setenv "SIMPLEMAIL" "1",
|
||||
# don't let the mail file grow
|
||||
unlink "/var/mail/%n"
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -158,24 +163,20 @@ commands = cp "/var/games/nethack/save/%u%n.gz" "/var/games/nethack/save/%u%n.gz
|
|||
#
|
||||
|
||||
DEFINE {
|
||||
game_path = "/bin/crawlss017"
|
||||
game_name = "Crawl Stone Soup 0.1.7"
|
||||
short_name = "Cr017"
|
||||
|
||||
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/"
|
||||
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/"
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -184,21 +185,18 @@ inprogressdir = "inprogress-crawlss017/"
|
|||
#
|
||||
|
||||
DEFINE {
|
||||
game_path = "/bin/crawlss020"
|
||||
game_name = "Crawl Stone Soup 0.2.0"
|
||||
short_name = "Cr020"
|
||||
|
||||
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/"
|
||||
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/"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue