fix bubblewrap script
This commit is contained in:
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
ELAN_HOME=$(lake env printenv ELAN_HOME)
|
ELAN_HOME=$(lake env printenv ELAN_HOME)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(exec bwrap\
|
(exec bwrap\
|
||||||
--bind ../../lean4game /lean4game \
|
--bind $2 /lean4game \
|
||||||
--bind $1 /game \
|
--bind $1 /game \
|
||||||
--bind $ELAN_HOME /elan \
|
--bind $ELAN_HOME /elan \
|
||||||
--bind /usr /usr \
|
--bind /usr /usr \
|
||||||
@@ -22,6 +24,6 @@ ELAN_HOME=$(lake env printenv ELAN_HOME)
|
|||||||
--unshare-uts \
|
--unshare-uts \
|
||||||
--unshare-cgroup \
|
--unshare-cgroup \
|
||||||
--die-with-parent \
|
--die-with-parent \
|
||||||
--chdir "/lean4game/server/build/bin/" \
|
--chdir "/lean4game/server/.lake/build/bin/" \
|
||||||
./gameserver --server /game
|
./gameserver --server /game
|
||||||
)
|
)
|
||||||
|
|||||||
+2
-2
@@ -85,8 +85,8 @@ function startServerProcess(owner, repo) {
|
|||||||
{ cwd: path.join(__dirname, "./.lake/build/bin/") })
|
{ cwd: path.join(__dirname, "./.lake/build/bin/") })
|
||||||
} else {
|
} else {
|
||||||
serverProcess = cp.spawn("./bubblewrap.sh",
|
serverProcess = cp.spawn("./bubblewrap.sh",
|
||||||
[game_dir],
|
[game_dir, path.join(__dirname, '..')],
|
||||||
{ cwd: __dirname })
|
{ cwd: path.join(__dirname, '..') })
|
||||||
}
|
}
|
||||||
serverProcess.on('error', error =>
|
serverProcess.on('error', error =>
|
||||||
console.error(`Launching Lean Server failed: ${error}`)
|
console.error(`Launching Lean Server failed: ${error}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user