File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,6 +68,37 @@ DJANGO_DEV=1 python manage.py test vulnerabilities/tests
6868DJANGO_DEV=1 python manage.py import --all
6969```
7070
71+ If you want to run the import periodically, you can use a systemd timer:
72+
73+ ```
74+ $ cat ~/.config/systemd/user/vulnerablecode.service
75+
76+ [Unit]
77+ Description=Update vulnerability database
78+
79+ [Service]
80+ Type=oneshot
81+ Environment="DJANGO_DEV=1"
82+ ExecStart=/path/to/venv/bin/python /path/to/vulnerablecode/manage.py import --all
83+
84+ $ cat ~/.config/systemd/user/vulnerablecode.timer
85+
86+ [Unit]
87+ Description=Periodically update vulnerability database
88+
89+ [Timer]
90+ OnCalendar=daily
91+
92+ [Install]
93+ WantedBy=multi-user.target
94+ ```
95+
96+ Start it with
97+
98+ ```
99+ systemctl --user daemon-reload && systemctl --user start vulnerablecode.timer
100+ ```
101+
71102## API
72103
73104Start the webserver
You can’t perform that action at this time.
0 commit comments