-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
executable file
·73 lines (70 loc) · 2.32 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
module.exports = {
// The components of the dashboard can be customized here.
// Make sure you restart server.js to apply the changes
port: 8081, // Note: You also have to set the device's IP address in app.js
filesystems: [
// List of mounted filesystems
// These are displayed in the system info table
'/dev/sda1' // My external HDD
],
commands: [
// Commands can be launched from the dashboard, but you have to define them here first.
// If you want to run commands as root, the node process must be running as root ('sudo node server.js')
// Please note: Even though the commands are defined here, and cannot be modified on the client side,
// running something as root AND exposing it to the web is quite dangerous...
{
id: 0,
label: 'Start XBMC',
command: 'initctl start xbmc',
refresh_status: true
// If set to true, the process status will be refreshed after issuing the command.
// This is useful when the command launches/kills one of the monitored processes.
},
{
id: 1,
label: 'Stop XBMC',
command: 'initctl stop xbmc',
refresh_status: true
},
{
id: 2,
label: 'Restart Deluge',
command: 'service deluge restart',
refresh_status: true
},
{
id: 3,
label: 'Shutdown',
command: 'poweroff'
// Note: Needs to be run as root
},
{
id: 4,
label: 'Reboot',
command: 'reboot'
// Note: Needs to be run as root
},
{
id: 5,
label: 'config.txt',
command: 'cat /boot/config.txt'
}
],
status: [
// You can use the 'top' command to find out the process' name.
{
id: 0,
label: 'XBMC',
pname: 'xbmc.bin',
text_on: 'Running',
text_off: 'Not running',
},
{
id: 1,
label: 'Deluge',
pname: 'deluged',
text_on: 'Running',
text_off: 'Not running',
}
]
}