Skip to content

Commit

Permalink
起動を検出できなかった問題と正常にmoduleをビルドできていなかった問題の解決
Browse files Browse the repository at this point in the history
  • Loading branch information
TAKUANf committed Jan 15, 2025
1 parent 746362a commit 179f1d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Discord-SimpleMusicBot-egg.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2025-01-15T16:58:38+09:00",
"exported_at": "2025-01-15T20:01:57+09:00",
"name": "Discord-SimpleMusicBot",
"author": "takuan.tn@gmail.com",
"description": "This is an automatic installation script for a clone type of Discord-SimpleMusicBot.\r\nCaution! If files are left in the directory when you run the reinstallation, it will perform an automatic update.\r\n\r\nDiscord-SimpleMusicBot\u306e\u30af\u30ed\u30fc\u30f3\u30bf\u30a4\u30d7\u306e\u81ea\u52d5\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002\r\n\u6ce8\u610f\uff01\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b9f\u884c\u3059\u308b\u969b\u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30d5\u30a1\u30a4\u30eb\u304c\u6b8b\u3063\u3066\u3044\u308b\u3068\u81ea\u52d5\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002",
Expand All @@ -16,13 +16,13 @@
"startup": "npm run start",
"config": {
"files": "{}",
"startup": "{\r\n \"done\": \"Ready\"\r\n}",
"startup": "{\r\n \"done\": \"Bot is ready now\"\r\n}",
"logs": "{}",
"stop": "^C"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n# Discord Simple Music Bot Installation Script\r\n\r\nset -e\r\n\r\n# Update package list and install required packages\r\napt update\r\napt install -y git ffmpeg python3 python3-pip nscd build-essential curl\r\n\r\n# Set safe directory for git\r\ngit config --global --add safe.directory \/mnt\/server\r\n\r\n# Clone repository\r\nGIT_REPO=\"https:\/\/github.com\/mtripg6666tdr\/Discord-SimpleMusicBot.git\"\r\nNODE_VERSION=\"20\"\r\n\r\n# Get GIT_VERSION from environment variable, or use default if not set\r\nGIT_V=${GIT_VERSION:-v4.3.10}\r\n\r\n# Ensure \/mnt\/server exists\r\nmkdir -p \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\n# Check if there are any files or directories (excluding . and ..)\r\nif [ -n \"$(find . -maxdepth 1 ! -name '.' ! -name '..' -print -quit)\" ]; then\r\n echo \"Files or directories found in \/mnt\/server. Updating code...\"\r\n # Update code\r\n git fetch\r\n git reset --hard ${GIT_V}\r\n \r\n # Install Node.js using nvm\r\n curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.7\/install.sh | bash\r\n export NVM_DIR=\"$([ -z \"${XDG_CONFIG_HOME-}\" ] && printf %s \"${HOME}\/.nvm\" || printf %s \"${XDG_CONFIG_HOME}\/nvm\")\"\r\n [ -s \"$NVM_DIR\/nvm.sh\" ] && \\. \"$NVM_DIR\/nvm.sh\"\r\n nvm install ${NODE_VERSION}\r\n nvm use ${NODE_VERSION}\r\n # Update dependencies\r\n npm install\r\n \r\n echo \"Code updated to version ${GIT_V}.\"\r\n exit 0\r\n \r\nelse\r\n echo \"No files or directories found in \/mnt\/server. Cloning repository...\"\r\n git clone ${GIT_REPO} .\r\n git reset --hard ${GIT_V}\r\n\r\n # Install Node.js using nvm\r\n curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.7\/install.sh | bash\r\n export NVM_DIR=\"$([ -z \"${XDG_CONFIG_HOME-}\" ] && printf %s \"${HOME}\/.nvm\" || printf %s \"${XDG_CONFIG_HOME}\/nvm\")\"\r\n [ -s \"$NVM_DIR\/nvm.sh\" ] && \\. \"$NVM_DIR\/nvm.sh\"\r\n nvm install ${NODE_VERSION}\r\n nvm use ${NODE_VERSION}\r\n\r\n # Install npm globally\r\n npm install -g npm\r\n\r\n # Clean npm cache and install dependencies\r\n npm cache clean --force\r\n npm install\r\n\r\n # Start bot for new install\r\n echo \"Starting bot for new install...\"\r\n npm run start\r\nfi\r\n\r\necho \"Installation completed.\"\r\nexit 0",
"script": "#!\/bin\/bash\r\n# Discord Simple Music Bot Installation Script\r\n\r\nset -e\r\n\r\n# Update package list and install required packages\r\napt update\r\napt install -y git ffmpeg python3 python3-pip nscd build-essential curl\r\n\r\n# Set safe directory for git\r\ngit config --global --add safe.directory \/mnt\/server\r\n\r\n# Clone repository\r\nGIT_REPO=\"https:\/\/github.com\/mtripg6666tdr\/Discord-SimpleMusicBot.git\"\r\nNODE_VERSION=\"20\"\r\n\r\n# Get GIT_VERSION from environment variable, or use default if not set\r\nGIT_V=${GIT_VERSION:-v4.3.10}\r\n\r\n# Ensure \/mnt\/server exists\r\nmkdir -p \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\n# Check if there are any files or directories (excluding . and ..)\r\nif [ -n \"$(find . -maxdepth 1 ! -name '.' ! -name '..' -print -quit)\" ]; then\r\n echo \"Files or directories found in \/mnt\/server. Updating code...\"\r\n # Update code\r\n git fetch\r\n git reset --hard ${GIT_V}\r\n \r\n # Install Node.js using nvm\r\n curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.7\/install.sh | bash\r\n export NVM_DIR=\"$([ -z \"${XDG_CONFIG_HOME-}\" ] && printf %s \"${HOME}\/.nvm\" || printf %s \"${XDG_CONFIG_HOME}\/nvm\")\"\r\n [ -s \"$NVM_DIR\/nvm.sh\" ] && \\. \"$NVM_DIR\/nvm.sh\"\r\n nvm install ${NODE_VERSION}\r\n nvm use ${NODE_VERSION}\r\n npm install -g npm@latest\r\n # Update dependencies\r\n npm install --build-from-source\r\n \r\n echo \"Code updated to version ${GIT_V}.\"\r\n exit 0\r\n \r\nelse\r\n echo \"No files or directories found in \/mnt\/server. Cloning repository...\"\r\n git clone ${GIT_REPO} .\r\n git reset --hard ${GIT_V}\r\n\r\n # Install Node.js using nvm\r\n curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.7\/install.sh | bash\r\n export NVM_DIR=\"$([ -z \"${XDG_CONFIG_HOME-}\" ] && printf %s \"${HOME}\/.nvm\" || printf %s \"${XDG_CONFIG_HOME}\/nvm\")\"\r\n [ -s \"$NVM_DIR\/nvm.sh\" ] && \\. \"$NVM_DIR\/nvm.sh\"\r\n nvm install ${NODE_VERSION}\r\n nvm use ${NODE_VERSION}\r\n\r\n # Install npm globally\r\n npm install -g npm@latest\r\n\r\n # Clean npm cache and install dependencies\r\n npm cache clean --force\r\n npm install --build-from-source\r\n\r\n # Start bot for new install\r\n echo \"Starting bot for new install...\"\r\n npm run start\r\nfi\r\n\r\necho \"Installation completed.\"\r\nexit 0",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
Expand Down

0 comments on commit 179f1d5

Please sign in to comment.