aaden-cli 1.2.13 → 1.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -65,7 +65,8 @@ program.command('mile-pay-option')
65
65
  .option('-s, --access-secret <accessSecret>')
66
66
  .option('-m, --merchant-no <merchantNo>')
67
67
  .action(milePayOption)
68
-
68
+ program.command('enable-resource-track').action(enableResourceTrack)
69
+ program.command('start-resource-track').action(startResourceTrack)
69
70
 
70
71
  if (program.debug) {
71
72
  debugInfo()
@@ -653,6 +654,34 @@ function editMilePaySettings (newValue, transform) {
653
654
  fs.writeFileSync(filePath, out)
654
655
  }
655
656
 
657
+ async function enableResourceTrack () {
658
+ cli.executeInShell([
659
+ 'cd /home/aaden',
660
+ 'mkdir aaden-resource-track',
661
+ 'cd aaden-resource-track',
662
+ 'axel -n 6 http://ik0001.ngrok.aaden.io/resource-track-0.0.1-jar-with-dependencies.jar',
663
+ 'wget http://ik0001.ngrok.aaden.io/serve-resource-track.sh',
664
+ 'wget http://ik0001.ngrok.aaden.io/start-resource-track.sh',
665
+ 'sudo chmod 777 serve-resource-track.sh',
666
+ 'wget http://ik0001.ngrok.aaden.io/aaden-resource-track.sql',
667
+ 'aaden-cli start-resource-track',
668
+ ],program.debug)
669
+ }
670
+
671
+ async function startResourceTrack() {
672
+ cli.executeInShell([
673
+ 'echo "请输入数据库密码(和开机密码,sudo密码相同)"',
674
+ 'mysql -uaaden -Daaden -p < /home/aaden/aaden-resource-track/aaden-resource-track.sql',
675
+ 'cd /etc/systemd/system',
676
+ 'sudo wget http://ik0001.ngrok.aaden.io/aaden-resource-track.service',
677
+ 'sudo systemctl daemon-reload',
678
+ 'sudo systemctl enable aaden-resource-track.service',
679
+ 'sudo systemctl start aaden-resource-track.service',
680
+ 'sudo service aaden-resource-track start',
681
+ ],program.debug)
682
+
683
+ }
684
+
656
685
  function returnTerminal () {
657
686
 
658
687
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aaden-cli",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {