From 12009da8fe02548ee2c163c81fe0387be6b0bf63 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sun, 18 Dec 2022 10:59:43 +0100 Subject: [PATCH 1/3] install script fix double tar cmd + move to python3 --- bots/discord/bastion/README.md | 3 --- bots/discord/bastion/egg-bastion.json | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/bots/discord/bastion/README.md b/bots/discord/bastion/README.md index 2156a2fb..963bf474 100644 --- a/bots/discord/bastion/README.md +++ b/bots/discord/bastion/README.md @@ -4,9 +4,6 @@ Bastion is a multi-purpose Discord Bot that can help you automate most tasks in your server, from administration and moderation to keeping the members active through various incentives, games and other fun activities. -## Install notes - -There will be a tar error on first install. You can safly ignore this. ## Running the bot diff --git a/bots/discord/bastion/egg-bastion.json b/bots/discord/bastion/egg-bastion.json index 0ad33578..cc0ea170 100644 --- a/bots/discord/bastion/egg-bastion.json +++ b/bots/discord/bastion/egg-bastion.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-12-15T16:23:16+01:00", + "exported_at": "2022-12-18T10:58:30+01:00", "name": "Bastion", "author": "parker@parkervcp.com", "description": "Bastion is a multi-purpose Discord Bot that can help you automate most tasks in your server, from administration and moderation to keeping the members active through various incentives, games and other fun activities", @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Bastion Bot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n## Move to install folder\r\napt update\r\napt install -y build-essential libtool python git tar\r\n\r\nmkdir -p \/mnt\/server\/\r\ncd \/mnt\/server\/\r\n\r\nif [ -d \"\/mnt\/server\/mongodb\" ]\r\nthen\r\n cd \/mnt\/server\/\r\n echo \"backing up mongodb\"\r\n REINSTALL=true\r\n tar -czf mongodb_backup.tar.gz mongodb\/\r\n mv mongodb_backup.tar.gz \/tmp\r\nfi\r\n\r\ntar -czf mongodb_back.tar.gz mongodb\/\r\nmv mongodb_back.tar.gz \/tmp\r\n\r\ncd \/mnt\/server\r\nrm -rf * .git\/ .github\/ .env.example .eslintrc.yml .gitattributes .gitignore .npm\/\r\n\r\n\r\n## Clone repo\r\necho \"cloning Bastion bot\"\r\ngit clone -q --depth 1 https:\/\/github.com\/TheBastionBot\/Bastion.git .\/\r\n\r\necho \"npm install --no-package-lock\"\r\nnpm install --no-package-lock\r\necho \"npm run build\"\r\nnpm run build\r\n\r\n## Move config files.\r\nmv settings.example.yaml settings.yaml\r\nrm bastion.cmd .env.example bastion.sh\r\n\r\n\r\nmkdir mongodb\/\r\nif [ \"$REINSTALL\" == \"true\" ]\r\nthen\r\n cd \/mnt\/server\r\n echo \"reinstall\"\r\n mv \/tmp\/mongodb_backup.tar.gz \/mnt\/server\r\n tar xf mongodb_backup.tar.gz\r\n rm mongodb_backup.tar.gz\r\nelse\r\n echo \"fresh install\"\r\nfi\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", + "script": "#!\/bin\/bash\r\n# Bastion Bot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n## Move to install folder\r\napt update\r\napt install -y build-essential libtool python3 git tar\r\n\r\nmkdir -p \/mnt\/server\/\r\ncd \/mnt\/server\/\r\n\r\nif [ -d \"\/mnt\/server\/mongodb\" ]\r\nthen\r\n cd \/mnt\/server\/\r\n echo \"backing up mongodb\"\r\n REINSTALL=true\r\n tar -czf mongodb_backup.tar.gz mongodb\/\r\n mv mongodb_backup.tar.gz \/tmp\r\nfi\r\n\r\ncd \/mnt\/server\r\nrm -rf * .git\/ .github\/ .env.example .eslintrc.yml .gitattributes .gitignore .npm\/\r\n\r\n\r\n## Clone repo\r\necho \"cloning Bastion bot\"\r\ngit clone -q --depth 1 https:\/\/github.com\/TheBastionBot\/Bastion.git .\/\r\n\r\necho \"npm install --no-package-lock\"\r\nnpm install --no-package-lock\r\necho \"npm run build\"\r\nnpm run build\r\n\r\n## Move config files.\r\nmv settings.example.yaml settings.yaml\r\nrm -rf bastion.cmd .env.example bastion.sh scripts\/\r\n\r\n\r\nmkdir -p mongodb\/\r\nif [ \"$REINSTALL\" == \"true\" ]\r\nthen\r\n cd \/mnt\/server\r\n echo \"reinstall\"\r\n mv \/tmp\/mongodb_backup.tar.gz \/mnt\/server\r\n tar xf mongodb_backup.tar.gz\r\n rm mongodb_backup.tar.gz\r\nelse\r\n echo \"fresh install\"\r\nfi\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", "container": "node:18-bullseye", "entrypoint": "bash" } @@ -119,4 +119,4 @@ "field_type": "text" } ] -} +} \ No newline at end of file From 3028b481b8d3f0b66977f2fbe1b11ba7bf90418c Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sun, 18 Dec 2022 11:28:45 +0100 Subject: [PATCH 2/3] bastion: update npm to latest on install add L31 npm install -g npm@latest --- bots/discord/bastion/egg-bastion.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bots/discord/bastion/egg-bastion.json b/bots/discord/bastion/egg-bastion.json index cc0ea170..37356c98 100644 --- a/bots/discord/bastion/egg-bastion.json +++ b/bots/discord/bastion/egg-bastion.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-12-18T10:58:30+01:00", + "exported_at": "2022-12-18T11:27:40+01:00", "name": "Bastion", "author": "parker@parkervcp.com", "description": "Bastion is a multi-purpose Discord Bot that can help you automate most tasks in your server, from administration and moderation to keeping the members active through various incentives, games and other fun activities", @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n# Bastion Bot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n## Move to install folder\r\napt update\r\napt install -y build-essential libtool python3 git tar\r\n\r\nmkdir -p \/mnt\/server\/\r\ncd \/mnt\/server\/\r\n\r\nif [ -d \"\/mnt\/server\/mongodb\" ]\r\nthen\r\n cd \/mnt\/server\/\r\n echo \"backing up mongodb\"\r\n REINSTALL=true\r\n tar -czf mongodb_backup.tar.gz mongodb\/\r\n mv mongodb_backup.tar.gz \/tmp\r\nfi\r\n\r\ncd \/mnt\/server\r\nrm -rf * .git\/ .github\/ .env.example .eslintrc.yml .gitattributes .gitignore .npm\/\r\n\r\n\r\n## Clone repo\r\necho \"cloning Bastion bot\"\r\ngit clone -q --depth 1 https:\/\/github.com\/TheBastionBot\/Bastion.git .\/\r\n\r\necho \"npm install --no-package-lock\"\r\nnpm install --no-package-lock\r\necho \"npm run build\"\r\nnpm run build\r\n\r\n## Move config files.\r\nmv settings.example.yaml settings.yaml\r\nrm -rf bastion.cmd .env.example bastion.sh scripts\/\r\n\r\n\r\nmkdir -p mongodb\/\r\nif [ \"$REINSTALL\" == \"true\" ]\r\nthen\r\n cd \/mnt\/server\r\n echo \"reinstall\"\r\n mv \/tmp\/mongodb_backup.tar.gz \/mnt\/server\r\n tar xf mongodb_backup.tar.gz\r\n rm mongodb_backup.tar.gz\r\nelse\r\n echo \"fresh install\"\r\nfi\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", + "script": "#!\/bin\/bash\r\n# Bastion Bot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n## Move to install folder\r\napt update\r\napt install -y build-essential libtool python3 git tar\r\n\r\n\r\nmkdir -p \/mnt\/server\/\r\ncd \/mnt\/server\/\r\n\r\nif [ -d \"\/mnt\/server\/mongodb\" ]\r\nthen\r\n cd \/mnt\/server\/\r\n echo \"backing up mongodb\"\r\n REINSTALL=true\r\n tar -czf mongodb_backup.tar.gz mongodb\/\r\n mv mongodb_backup.tar.gz \/tmp\r\nfi\r\n\r\ncd \/mnt\/server\r\nrm -rf * .git\/ .github\/ .env.example .eslintrc.yml .gitattributes .gitignore .npm\/\r\n\r\n\r\n## Clone repo\r\necho \"cloning Bastion bot\"\r\ngit clone -q --depth 1 https:\/\/github.com\/TheBastionBot\/Bastion.git .\/\r\n\r\necho \"updating npm\"\r\nnpm install -g npm@latest\r\necho \"npm install --no-package-lock\"\r\nnpm install --no-package-lock\r\necho \"npm run build\"\r\nnpm run build\r\n\r\n## Move config files.\r\nmv settings.example.yaml settings.yaml\r\nrm -rf bastion.cmd .env.example bastion.sh scrips\/\r\n\r\n\r\nmkdir -p mongodb\/\r\nif [ \"$REINSTALL\" == \"true\" ]\r\nthen\r\n cd \/mnt\/server\r\n echo \"reinstall\"\r\n mv \/tmp\/mongodb_backup.tar.gz \/mnt\/server\r\n tar xf mongodb_backup.tar.gz\r\n rm mongodb_backup.tar.gz\r\nelse\r\n echo \"fresh install\"\r\nfi\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"", "container": "node:18-bullseye", "entrypoint": "bash" } @@ -119,4 +119,4 @@ "field_type": "text" } ] -} \ No newline at end of file +} From 0ad633db887b203314a1bf1218953b0ac64599f6 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Wed, 29 Mar 2023 10:35:02 +0200 Subject: [PATCH 3/3] bastion: new ENV variables --- bots/discord/bastion/egg-bastion.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bots/discord/bastion/egg-bastion.json b/bots/discord/bastion/egg-bastion.json index 37356c98..038d1707 100644 --- a/bots/discord/bastion/egg-bastion.json +++ b/bots/discord/bastion/egg-bastion.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2022-12-18T11:27:40+01:00", + "exported_at": "2023-03-29T10:33:50+02:00", "name": "Bastion", "author": "parker@parkervcp.com", "description": "Bastion is a multi-purpose Discord Bot that can help you automate most tasks in your server, from administration and moderation to keeping the members active through various incentives, games and other fun activities", @@ -31,7 +31,7 @@ { "name": "Bot Token", "description": "The Bot Token you get from https:\/\/discordapp.com\/developers\/applications\/", - "env_variable": "TESSERACT_BOT_TOKEN", + "env_variable": "BOT_TOKEN", "default_value": "GETABOTTOKEN", "user_viewable": true, "user_editable": true, @@ -41,7 +41,7 @@ { "name": "Bot Client ID", "description": "The Bot ID you get from https:\/\/discordapp.com\/developers\/applications\/", - "env_variable": "TESSERACT_BOT_ID", + "env_variable": "BOT_ID", "default_value": "", "user_viewable": true, "user_editable": true, @@ -51,7 +51,7 @@ { "name": "Mongo URL", "description": "use `mongodb:\/\/127.0.0.1:27017\/bastion` for using the build in mongodb server", - "env_variable": "TESSERACT_MONGO_URI", + "env_variable": "MONGO_URI", "default_value": "mongodb:\/\/127.0.0.1:27017\/bastion", "user_viewable": true, "user_editable": true, @@ -81,7 +81,7 @@ { "name": "Safe Mode", "description": "When enabled, this disables usage of unsafe commands like `exec` and `eval`.", - "env_variable": "TESSERACT_UNSAFE_MODE", + "env_variable": "UNSAFE_MODE", "default_value": "false", "user_viewable": true, "user_editable": true, @@ -119,4 +119,4 @@ "field_type": "text" } ] -} +} \ No newline at end of file