eggs/generic/nodejs
Loki 78f4e8f36b
Fix error in startup command
Changed ``if [[ "${MAIN_FILE}" == *.js ]]``
To ``if [[ "${MAIN_FILE}" == "*.js" ]]``

The *.js without quotes compared MAIN_FILE to all files in the current directory that end with .js, resulting in errors like:
```bash
:/home/container$ if [[ -d .git ]] && [[ ${AUTO_UPDATE} == "1" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then /usr/local/bin/npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then /usr/local/bin/npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f /home/container/package.json ]; then /usr/local/bin/npm install; fi; if [[ "${MAIN_FILE}" == start.js test.js ]]; then /usr/local/bin/node "/home/container/${MAIN_FILE}"; else /usr/local/bin/ts-node "${MAIN_FILE}"; fi
/entrypoint.sh: eval: line 16: syntax error in conditional expression
/entrypoint.sh: eval: line 16: syntax error near `test.js'
/entrypoint.sh: eval: line 16: `if [[ -d .git ]] && [[ ${AUTO_UPDATE} == "1" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then /usr/local/bin/npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then /usr/local/bin/npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f /home/container/package.json ]; then /usr/local/bin/npm install; fi; if [[ "${MAIN_FILE}" == start.js test.js ]]; then /usr/local/bin/node "/home/container/${MAIN_FILE}"; else /usr/local/bin/ts-node "${MAIN_FILE}"; fi'
```
because it's interpreted as ``if [[ "${MAIN_FILE}" == start.js test.js ]];``
2023-08-17 18:38:17 -07:00
..
egg-node-js-generic.json Fix error in startup command 2023-08-17 18:38:17 -07:00
README.md chore(generic): update generic readmes 2022-11-13 17:22:29 +00:00

JavaScript Language Generic

This egg is designed to run any generic JavaScript application, allowing users to pull their own JavaScript source code from a Github repository.

There is an option to allow a user to upload their own files to run a bot.

The startup configs and commands may need changing to actually function properly.

Configuration

The server will be stuck as starting until the egg Start Configuration is modified. You have to edit the text to match something your bot will print for Pterodactyl panel to detect it as running. image

You can use arrays to have multiple different values when different bots are being used

{
  "done":[
    "change this text 1",
    "change this text 2"
  ]
}