-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from FafnerKeyZee/main
Adding systemd and logrotate
- Loading branch information
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/var/log/cpe*.log { | ||
daily | ||
missingok | ||
rotate 14 | ||
compress | ||
delaycompress | ||
notifempty | ||
copytruncate | ||
create 0640 root root | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=circl dot lu CPE guesser service | ||
Documentation=https://github.com/cve-search/cpe-guesser | ||
|
||
[Service] | ||
WorkingDirectory=$(INSTALLDIR)/bin | ||
ExecStart=python3 import.py -d -u | ||
User=$(CPE_USER) | ||
Type=oneshot | ||
StandardOutput=append:/var/log/cpeguesser_message.log | ||
StandardError=append:/var/log/cpeguesser_error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=circl dot lu CPE guesser service trigger timer | ||
|
||
[Timer] | ||
Unit=cpeguesser.service | ||
OnCalendar=*-*-* 0/12:00:00 | ||
|
||
[Install] | ||
WantedBy=timers.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[Unit] | ||
Description=circl dot lu CPE guesser service | ||
#Requires=mongodb.service redis-server.service | ||
Documentation=https://github.com/cve-search/cpe-guesser | ||
after=network.target | ||
|
||
[Service] | ||
WorkingDirectory=$(INSTALLDIR)/bin | ||
ExecStart=python3 server.py | ||
User=$(CPE_USER) | ||
Group=$(CPE_USER) | ||
Type=simple | ||
Restart=always | ||
StandardOutput=append:/var/log/cpeweb_message.log | ||
StandardError=append:/var/log/cpeweb_error.log | ||
|
||
[Install] | ||
WantedBy=multi-user.target |