@custombots/custombot 2.0.0 → 2.0.2
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/install.js +4 -6
- package/package.json +3 -3
package/install.js
CHANGED
|
@@ -9,22 +9,20 @@ const svc = new Service({
|
|
|
9
9
|
grow: 0.5,
|
|
10
10
|
maxRestarts: 10,
|
|
11
11
|
abortOnError: false
|
|
12
|
+
}); // <-- вот эта строка была потеряна
|
|
12
13
|
|
|
13
14
|
if (process.getuid && process.getuid() !== 0) {
|
|
14
|
-
console.error('This operation
|
|
15
|
+
console.error('This operation requires root rights. Run with sudo.');
|
|
15
16
|
process.exit(1);
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
svc.on('install', () => {
|
|
19
20
|
svc.start();
|
|
20
21
|
});
|
|
21
|
-
|
|
22
22
|
svc.on('alreadyinstalled', () => {});
|
|
23
|
-
|
|
24
23
|
svc.on('start', () => {});
|
|
25
|
-
|
|
26
24
|
svc.on('uninstall', () => {});
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
svc.on('error', (err) => {
|
|
26
|
+
});
|
|
29
27
|
|
|
30
28
|
svc.install();
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@custombots/custombot",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Free module for make you own bot.",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"postinstall": "node install.js"
|
|
7
|
+
"postinstall": "sudo node install.js"
|
|
8
8
|
},
|
|
9
9
|
"author": "custombots",
|
|
10
10
|
"license": "MIT",
|