7 cat > $out/bin
/control
<<EOF
10 export PATH=$PATH:$su/bin
14 su $user -s /bin/sh -c "$jboss/bin/run.sh \
15 -Djboss.server.base.dir=$serverDir \
16 -Djboss.server.base.url=file://$serverDir \
17 -Djboss.server.temp.dir=$tempDir \
18 -Djboss.server.log.dir=$logDir \
19 -Djboss.server.lib.url=$libUrl \
25 su $user -s /bin/sh -c "$jboss/bin/shutdown.sh -S"
33 elif test "\$1" = stop
36 elif test "\$1" = init
38 echo "Are you sure you want to create a new server instance (old server instance will be lost!)?"
41 if ! test \$answer = "yes"
49 cp -av $jboss/server/default .
50 sed -i -e "s|deploy/|$deployDir|" default/conf/jboss-service.xml
52 if ! test "$useJK" = ""
54 sed -i -e 's|<attribute name="UseJK">false</attribute>|<attribute name="UseJK">true</attribute>|' default/deploy/jboss-web.deployer/META-INF/jboss-service.xml
55 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
58 # Make files accessible for the server user
60 chown -R $user $serverDir
61 for i in \`find $serverDir -type d\`
65 for i in \`find $serverDir -type f\`