aaden-cli 1.2.16 → 1.2.18

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
@@ -67,6 +67,7 @@ program.command('mile-pay-option')
67
67
  .action(milePayOption)
68
68
  program.command('enable-resource-track').action(enableResourceTrack)
69
69
  program.command('start-resource-track').action(startResourceTrack)
70
+ program.command('editIni').action(editIni)
70
71
 
71
72
  if (program.debug) {
72
73
  debugInfo()
@@ -686,6 +687,24 @@ function returnTerminal () {
686
687
 
687
688
  }
688
689
 
690
+ function editIni () {
691
+ cli.executeInShell([
692
+ 'sudo chmod 777 /var/www/html/Resource/config/config.ini',
693
+ 'aaden-cli fix-cronjob',
694
+ ],program.debug)
695
+ const ini = require("ini")
696
+ const filePath = '/var/www/html/Resource/config/config.ini'
697
+ const info = ini.parse(fs.readFileSync(filePath, 'utf-8'))
698
+ console.log(info)
699
+ if(!info.Email) {
700
+ info.Email = {}
701
+ }
702
+ info.Email.AutoSend3in1LastMonth = true
703
+
704
+ fs.writeFileSync(filePath, ini.stringify(info))
705
+
706
+ }
707
+
689
708
  function getPrivilegeCMD (path, pri = '+x', relativePath = true) {
690
709
  const command = []
691
710
  if (relativePath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aaden-cli",
3
- "version": "1.2.16",
3
+ "version": "1.2.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -36,6 +36,7 @@
36
36
  "release-it": "^13.6.3"
37
37
  },
38
38
  "dependencies": {
39
- "aws-sdk": "^2.1046.0"
39
+ "aws-sdk": "^2.1046.0",
40
+ "ini": "^3.0.1"
40
41
  }
41
42
  }