aaden-cli 1.2.22 → 1.2.24

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.
@@ -11,7 +11,8 @@ echo "* * * * * wget -O /dev/null http://localhost/PHP/CloudStuff/FetchOrdersFor
11
11
  echo "* * * * * wget -O /dev/null http://localhost/PHP/AccessLog.php?op=reportStatus" >>conf
12
12
  echo "* * * * * /var/www/html/crontab.sh > /dev/null" >>conf
13
13
  echo "59 4 1 * * wget -O /dev/null http://localhost/PHP/Datev.php?op=autoSendDatevCsv > /dev/null" >>conf
14
- echo "* * * * * curl --location --request GET 'http://ik0001.ngrok.aaden.io/PHP/BackendData.php?op=autoSend3In1'" >>conf
14
+ echo "* * * * * curl --location --request GET 'http://localhost/PHP/BackendData.php?op=autoSend3In1'" >>conf
15
+ echo "* * * * * curl --location --request GET 'http://localhost/PHP/BackendData.php?op=autoSendMonthSummary'" >>conf
15
16
  sudo crontab -u aaden -r
16
17
  sudo crontab -u aaden conf
17
18
  echo "Innerken322." | sudo -S rm -f conf
File without changes
@@ -1,15 +1,10 @@
1
1
  #!/bin/bash
2
2
 
3
- TSE_PATH=$(sudo fdisk -l | grep 7,5 | cut -d ' ' -f 1)
4
- echo "TSE_PATH:$TSE_PATH"
5
- UUID=$(sudo blkid $TSE_PATH | cut -d "=" -f 3 | cut -d '"' -f 2)
6
- echo "UUID:$UUID"
7
-
8
3
  sudo mkdir -p "/media/aaden/SWISSBIT"
9
4
  sudo touch tmp
10
5
  sudo chmod 777 tmp
11
6
  sudo cat /etc/fstab >tmp
12
- echo "UUID=$UUID /media/aaden/SWISSBIT vfat defaults 0 2" >>tmp
7
+ echo "UUID=5AFD-8706 /media/aaden/SWISSBIT vfat defaults 0 2" >>tmp
13
8
  sudo mv /etc/fstab /etc/fstab.backup
14
9
  sudo mv tmp /etc/fstab
15
10
  echo 'END AUTO CONFIG'
File without changes
File without changes
package/dist/index.js CHANGED
@@ -58161,7 +58161,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.19.2","description":"P
58161
58161
  /***/ ((module) => {
58162
58162
 
58163
58163
  "use strict";
58164
- module.exports = {"i8":"1.2.21"};
58164
+ module.exports = {"i8":"1.2.23"};
58165
58165
 
58166
58166
  /***/ }),
58167
58167
 
@@ -58449,6 +58449,7 @@ program.command('mile-pay-option')
58449
58449
  program.command('enable-resource-track').action(enableResourceTrack)
58450
58450
  program.command('start-resource-track').action(startResourceTrack)
58451
58451
  program.command('auto-send-mail').action(editIni)
58452
+ program.command('auto-send-summary').action(autoSendSummaryLastMonth)
58452
58453
 
58453
58454
  if (program.debug) {
58454
58455
  debugInfo()
@@ -59086,6 +59087,24 @@ function editIni () {
59086
59087
 
59087
59088
  }
59088
59089
 
59090
+ function autoSendSummaryLastMonth () {
59091
+ cli.executeInShell([
59092
+ 'sudo chmod 777 /var/www/html/Resource/config/config.ini',
59093
+ 'aaden-cli fix-cronjob',
59094
+ ], program.debug)
59095
+ const ini = __nccwpck_require__(80045)
59096
+ const filePath = '/var/www/html/Resource/config/config.ini'
59097
+ const info = ini.parse(fs.readFileSync(filePath, 'utf-8'))
59098
+ console.log(info)
59099
+ if (!info.Email) {
59100
+ info.Email = {}
59101
+ }
59102
+ info.Email.AutoSendSummaryLastMonth = true
59103
+
59104
+ fs.writeFileSync(filePath, ini.stringify(info))
59105
+
59106
+ }
59107
+
59089
59108
  function getPrivilegeCMD (path, pri = '+x', relativePath = true) {
59090
59109
  const command = []
59091
59110
  if (relativePath) {
package/index.js CHANGED
@@ -68,6 +68,7 @@ program.command('mile-pay-option')
68
68
  program.command('enable-resource-track').action(enableResourceTrack)
69
69
  program.command('start-resource-track').action(startResourceTrack)
70
70
  program.command('auto-send-mail').action(editIni)
71
+ program.command('auto-send-summary').action(autoSendSummaryLastMonth)
71
72
 
72
73
  if (program.debug) {
73
74
  debugInfo()
@@ -705,6 +706,24 @@ function editIni () {
705
706
 
706
707
  }
707
708
 
709
+ function autoSendSummaryLastMonth () {
710
+ cli.executeInShell([
711
+ 'sudo chmod 777 /var/www/html/Resource/config/config.ini',
712
+ 'aaden-cli fix-cronjob',
713
+ ], program.debug)
714
+ const ini = require("ini")
715
+ const filePath = '/var/www/html/Resource/config/config.ini'
716
+ const info = ini.parse(fs.readFileSync(filePath, 'utf-8'))
717
+ console.log(info)
718
+ if (!info.Email) {
719
+ info.Email = {}
720
+ }
721
+ info.Email.AutoSendSummaryLastMonth = true
722
+
723
+ fs.writeFileSync(filePath, ini.stringify(info))
724
+
725
+ }
726
+
708
727
  function getPrivilegeCMD (path, pri = '+x', relativePath = true) {
709
728
  const command = []
710
729
  if (relativePath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aaden-cli",
3
- "version": "1.2.22",
3
+ "version": "1.2.24",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {