mirror of
https://github.com/unraid/api.git
synced 2026-01-04 07:29:48 -06:00
chore: cleanup the cleanup scripts (#1266)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Updated the plugin installation endpoint to use a new port for improved connectivity. - Streamlined installation and removal processes for a more reliable setup and clearer cleanup feedback. - Introduced a new script to manage cleanup operations, enhancing system maintenance during removals. - **Chores** - Expanded file monitoring to support additional file types, ensuring timely updates. - Optimized background operations that configure essential components for enhanced overall performance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -506,3 +506,273 @@ fi
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/io/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; ln -sf ../uuid/bin/uuid uuid )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf apollo-pbjs )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbjs apollo-pbjs )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf apollo-pbts )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbts apollo-pbts )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf blessed )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../blessed/bin/tput.js blessed )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esbuild )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../esbuild/bin/esbuild esbuild )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf escodegen )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../escodegen/bin/escodegen.js escodegen )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esgenerate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../escodegen/bin/esgenerate.js esgenerate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esparse )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../esprima/bin/esparse.js esparse )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esvalidate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../esprima/bin/esvalidate.js esvalidate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf fxparser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../fast-xml-parser/src/cli/cli.js fxparser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf glob )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../glob/dist/esm/bin.mjs glob )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf js-yaml )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../js-yaml/bin/js-yaml.js js-yaml )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf jsesc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../jsesc/bin/jsesc jsesc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf loose-envify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../loose-envify/cli.js loose-envify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf mime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../mime/cli.js mime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf mkdirp )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../mkdirp/bin/cmd.js mkdirp )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf mustache )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../mustache/bin/mustache mustache )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf needle )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../needle/bin/needle needle )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf node-which )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../which/bin/node-which node-which )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf opencollective )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@nuxt/opencollective/bin/opencollective.js opencollective )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf parser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@babel/parser/bin/babel-parser.js parser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pino )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pino/bin.js pino )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pino-pretty )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pino-pretty/bin.js pino-pretty )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2 )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2 pm2 )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2-dev )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2-dev pm2-dev )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2-docker )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2-docker pm2-docker )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2-runtime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2-runtime pm2-runtime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf prettier )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../prettier/bin/prettier.cjs prettier )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf relay-compiler )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@ardatan/relay-compiler/bin/relay-compiler relay-compiler )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf resolve )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../resolve/bin/resolve resolve )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf semver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sha.js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sha.js/bin.js sha.js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sshpk-conv )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-conv sshpk-conv )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sshpk-sign )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-sign sshpk-sign )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sshpk-verify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-verify sshpk-verify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf systeminformation )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../systeminformation/lib/cli.js systeminformation )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf tsc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../typescript/bin/tsc tsc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf tsserver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../typescript/bin/tsserver tsserver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf tsx )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../tsx/dist/cli.mjs tsx )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf ua-parser-js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../ua-parser-js/script/cli.js ua-parser-js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../uuid/dist/esm/bin/uuid uuid )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf xss )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../xss/bin/xss xss )
|
||||
( cd usr/local/unraid-api/node_modules/@apollo/server/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/@apollo/server/node_modules/.bin ; ln -sf ../uuid/dist/bin/uuid uuid )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/agent/node_modules/.bin ; rm -rf semver )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/agent/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/io/node_modules/.bin ; rm -rf semver )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/io/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; ln -sf ../uuid/bin/uuid uuid )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf apollo-pbjs )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbjs apollo-pbjs )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf apollo-pbts )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbts apollo-pbts )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf blessed )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../blessed/bin/tput.js blessed )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esbuild )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../esbuild/bin/esbuild esbuild )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf escodegen )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../escodegen/bin/escodegen.js escodegen )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esgenerate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../escodegen/bin/esgenerate.js esgenerate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esparse )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../esprima/bin/esparse.js esparse )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esvalidate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../esprima/bin/esvalidate.js esvalidate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf fxparser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../fast-xml-parser/src/cli/cli.js fxparser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf glob )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../glob/dist/esm/bin.mjs glob )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf js-yaml )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../js-yaml/bin/js-yaml.js js-yaml )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf jsesc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../jsesc/bin/jsesc jsesc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf loose-envify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../loose-envify/cli.js loose-envify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf mime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../mime/cli.js mime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf mkdirp )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../mkdirp/bin/cmd.js mkdirp )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf mustache )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../mustache/bin/mustache mustache )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf needle )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../needle/bin/needle needle )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf node-which )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../which/bin/node-which node-which )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf opencollective )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@nuxt/opencollective/bin/opencollective.js opencollective )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf parser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@babel/parser/bin/babel-parser.js parser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pino )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pino/bin.js pino )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pino-pretty )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pino-pretty/bin.js pino-pretty )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2 )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2 pm2 )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2-dev )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2-dev pm2-dev )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2-docker )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2-docker pm2-docker )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2-runtime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2-runtime pm2-runtime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf prettier )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../prettier/bin/prettier.cjs prettier )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf relay-compiler )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@ardatan/relay-compiler/bin/relay-compiler relay-compiler )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf resolve )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../resolve/bin/resolve resolve )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf semver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sha.js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sha.js/bin.js sha.js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sshpk-conv )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-conv sshpk-conv )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sshpk-sign )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-sign sshpk-sign )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sshpk-verify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-verify sshpk-verify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf systeminformation )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../systeminformation/lib/cli.js systeminformation )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf tsc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../typescript/bin/tsc tsc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf tsserver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../typescript/bin/tsserver tsserver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf tsx )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../tsx/dist/cli.mjs tsx )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf ua-parser-js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../ua-parser-js/script/cli.js ua-parser-js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../uuid/dist/esm/bin/uuid uuid )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf xss )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../xss/bin/xss xss )
|
||||
( cd usr/local/unraid-api/node_modules/@apollo/server/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/@apollo/server/node_modules/.bin ; ln -sf ../uuid/dist/bin/uuid uuid )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/agent/node_modules/.bin ; rm -rf semver )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/agent/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/io/node_modules/.bin ; rm -rf semver )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/io/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; ln -sf ../uuid/bin/uuid uuid )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf apollo-pbjs )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbjs apollo-pbjs )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf apollo-pbts )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbts apollo-pbts )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf blessed )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../blessed/bin/tput.js blessed )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esbuild )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../esbuild/bin/esbuild esbuild )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf escodegen )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../escodegen/bin/escodegen.js escodegen )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esgenerate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../escodegen/bin/esgenerate.js esgenerate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esparse )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../esprima/bin/esparse.js esparse )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf esvalidate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../esprima/bin/esvalidate.js esvalidate )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf fxparser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../fast-xml-parser/src/cli/cli.js fxparser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf glob )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../glob/dist/esm/bin.mjs glob )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf js-yaml )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../js-yaml/bin/js-yaml.js js-yaml )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf jsesc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../jsesc/bin/jsesc jsesc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf loose-envify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../loose-envify/cli.js loose-envify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf mime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../mime/cli.js mime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf mkdirp )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../mkdirp/bin/cmd.js mkdirp )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf mustache )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../mustache/bin/mustache mustache )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf needle )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../needle/bin/needle needle )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf node-which )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../which/bin/node-which node-which )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf opencollective )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@nuxt/opencollective/bin/opencollective.js opencollective )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf parser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@babel/parser/bin/babel-parser.js parser )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pino )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pino/bin.js pino )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pino-pretty )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pino-pretty/bin.js pino-pretty )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2 )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2 pm2 )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2-dev )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2-dev pm2-dev )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2-docker )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2-docker pm2-docker )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf pm2-runtime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../pm2/bin/pm2-runtime pm2-runtime )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf prettier )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../prettier/bin/prettier.cjs prettier )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf relay-compiler )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../@ardatan/relay-compiler/bin/relay-compiler relay-compiler )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf resolve )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../resolve/bin/resolve resolve )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf semver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sha.js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sha.js/bin.js sha.js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sshpk-conv )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-conv sshpk-conv )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sshpk-sign )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-sign sshpk-sign )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf sshpk-verify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-verify sshpk-verify )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf systeminformation )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../systeminformation/lib/cli.js systeminformation )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf tsc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../typescript/bin/tsc tsc )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf tsserver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../typescript/bin/tsserver tsserver )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf tsx )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../tsx/dist/cli.mjs tsx )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf ua-parser-js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../ua-parser-js/script/cli.js ua-parser-js )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../uuid/dist/esm/bin/uuid uuid )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; rm -rf xss )
|
||||
( cd usr/local/unraid-api/node_modules/.bin ; ln -sf ../xss/bin/xss xss )
|
||||
( cd usr/local/unraid-api/node_modules/@apollo/server/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/@apollo/server/node_modules/.bin ; ln -sf ../uuid/dist/bin/uuid uuid )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/agent/node_modules/.bin ; rm -rf semver )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/agent/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/io/node_modules/.bin ; rm -rf semver )
|
||||
( cd usr/local/unraid-api/node_modules/@pm2/io/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
|
||||
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; rm -rf uuid )
|
||||
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; ln -sf ../uuid/bin/uuid uuid )
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
// Script Name: cleanup_operations.php
|
||||
// Purpose: Handles cleanup operations for both install on unsupported OS and during removal
|
||||
//
|
||||
// Usage:
|
||||
// ./cleanup_operations.php
|
||||
// ./cleanup_operations.php --debug
|
||||
|
||||
// Parse command line arguments
|
||||
$debug = false;
|
||||
|
||||
if (isset($argv)) {
|
||||
foreach ($argv as $arg) {
|
||||
if ($arg === '--debug') {
|
||||
$debug = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Debug function
|
||||
function debug_log($message) {
|
||||
global $debug;
|
||||
if ($debug) {
|
||||
echo "[DEBUG] [cleanup_operations]: $message\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Get Unraid version and myservers config
|
||||
$ver = @parse_ini_file('/etc/unraid-version', true)['version'];
|
||||
$msini = @parse_ini_file('/boot/config/plugins/dynamix.my.servers/myservers.cfg', true);
|
||||
|
||||
debug_log("Unraid version: $ver");
|
||||
debug_log("myservers.cfg exists: " . ($msini !== false ? "Yes" : "No"));
|
||||
|
||||
echo "\n";
|
||||
echo "**********************************\n";
|
||||
echo "🧹 CLEANING UP - may take a minute\n";
|
||||
echo "**********************************\n";
|
||||
|
||||
if (file_exists("/boot/.git")) {
|
||||
if (file_exists("/etc/rc.d/rc.flash_backup")) {
|
||||
# stop flash backup service
|
||||
echo "\nStopping flash backup service. Please wait…";
|
||||
exec("/etc/rc.d/rc.flash_backup stop &>/dev/null");
|
||||
}
|
||||
if (file_exists("/usr/local/emhttp/plugins/dynamix.my.servers/include/UpdateFlashBackup.php")) {
|
||||
# deactivate and delete local flash backup
|
||||
echo "\nDeactivating flash backup. Please wait…";
|
||||
passthru("/usr/bin/php /usr/local/emhttp/plugins/dynamix.my.servers/include/UpdateFlashBackup.php deactivate");
|
||||
}
|
||||
}
|
||||
|
||||
# set "Allow Remote Access" to "No" and sign out from Unraid Connect
|
||||
if ($msini !== false) {
|
||||
# stop unraid-api
|
||||
echo "\nStopping unraid-api. Please wait…";
|
||||
$output = shell_exec("/etc/rc.d/rc.unraid-api stop --delete 2>&1");
|
||||
if (!$output) {
|
||||
echo "Waiting for unraid-api to stop...\n";
|
||||
sleep(5); // Give it a few seconds to fully stop
|
||||
}
|
||||
echo "Stopped unraid-api: $output";
|
||||
|
||||
if (!empty($msini['remote']['username'])) {
|
||||
$var = parse_ini_file("/var/local/emhttp/var.ini");
|
||||
$keyfile = @file_get_contents($var['regFILE']);
|
||||
if ($keyfile !== false) {
|
||||
echo "\nSigning out of Unraid Connect\n";
|
||||
$ch = curl_init('https://keys.lime-technology.com/account/server/unregister');
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, ['keyfile' => @base64_encode($keyfile)]);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
}
|
||||
}
|
||||
|
||||
# remove myservers.cfg
|
||||
unlink('/boot/config/plugins/dynamix.my.servers/myservers.cfg');
|
||||
|
||||
# reload nginx to disable Remote Access
|
||||
echo "\n⚠️ Reloading Web Server. If this window stops updating for two minutes please close it.\n";
|
||||
exec("/etc/rc.d/rc.nginx reload &>/dev/null");
|
||||
}
|
||||
|
||||
exit(0);
|
||||
Reference in New Issue
Block a user