3 if [ -e "$NIX_ATTRS_SH_FILE" ]; then .
"$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh
]; then . .attrs.sh
; fi
8 cat > $out/bin
/control
<<EOF
10 chown -R $user $logDir
11 export PATH=$PATH:$su/bin
15 su $user -s /bin/sh -c "$jboss/bin/run.sh \
16 -Djboss.server.base.dir=$serverDir \
17 -Djboss.server.base.url=file://$serverDir \
18 -Djboss.server.temp.dir=$tempDir \
19 -Djboss.server.log.dir=$logDir \
20 -Djboss.server.lib.url=$libUrl \
26 su $user -s /bin/sh -c "$jboss/bin/shutdown.sh -S"
34 elif test "\$1" = stop
37 elif test "\$1" = init
39 echo "Are you sure you want to create a new server instance (old server instance will be lost!)?"
42 if ! test \$answer = "yes"
50 cp -av $jboss/server/default .
51 sed -i -e "s|deploy/|$deployDir|" default/conf/jboss-service.xml
53 if ! test "$useJK" = ""
55 sed -i -e 's|<attribute name="UseJK">false</attribute>|<attribute name="UseJK">true</attribute>|' default/deploy/jboss-web.deployer/META-INF/jboss-service.xml
56 sed -i -e 's|<Engine name="jboss.web" defaultHost="localhost">|<Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1">|' default/deploy/jboss-web.deployer/server.xml
59 # Make files accessible for the server user
61 chown -R $user $serverDir
62 for i in \`find $serverDir -type d\`
66 for i in \`find $serverDir -type f\`