You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**For security reasons:** It is recommended to configure the GitHub Token and Email Password using environment variables to avoid storing sensitive information in plain text, as shown below:
48
+
49
+
```shell
50
+
# GitHub
51
+
export GITHUB_TOKEN="github_pat_xxx"
52
+
# Email
53
+
export EMAIL_PASSWORD="password"
39
54
```
40
55
41
56
### 3. How to Run
42
57
43
-
GitHub Sentinel supports three different ways to run the application:
58
+
GitHub Sentinel supports the following three modes of operation:
44
59
45
60
#### A. Run as a Command-Line Tool
46
61
47
-
You can run the application interactively from the command line:
62
+
You can interactively run the application from the command line:
48
63
49
64
```sh
50
65
python src/command_tool.py
51
66
```
52
67
53
-
In this mode, you can manually input commands to manage subscriptions, retrieve updates, and generate reports.
68
+
In this mode, you can manually enter commands to manage subscriptions, retrieve updates, and generate reports.
54
69
55
-
#### B. Run as a Daemon Process with Scheduler
70
+
#### B. Run as a Background Service
56
71
57
-
To run the application as a background service (daemon) that regularly checks for updates:
72
+
To run the application as a background service (daemon), it will automatically update according to the configured schedule.
58
73
59
-
1. Ensure you have the `python-daemon` package installed:
74
+
You can use the daemon management script [daemon_control.sh](daemon_control.sh) to start, check the status, stop, and restart:
75
+
76
+
1. Start the service:
60
77
61
78
```sh
62
-
pip install python-daemon
79
+
$ ./daemon_control.sh start
80
+
Starting DaemonProcess...
81
+
DaemonProcess started.
63
82
```
64
83
65
-
2. Launch the daemon process:
84
+
- This will launch [./src/daemon_process.py], generating reports periodically as setin`config.json`, and sending emails.
85
+
- Service logs will be saved to `logs/DaemonProcess.log`, with historical logs also appended to `logs/app.log`.
0 commit comments