Update setup for cron

This commit is contained in:
Kumi 2019-01-31 18:43:53 +00:00
parent b76b3acd49
commit 3af6677da0
2 changed files with 5 additions and 0 deletions

3
misc/cron Normal file
View file

@ -0,0 +1,3 @@
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
*/5 * * * * vpn (cd /opt/vpnmanager; python3 manage.py runcrons)

View file

@ -17,6 +17,8 @@ mkdir images
./manage.py migrate
sudo chown vpn.vpn . /etc/openvpn/ca -R
sudo cp misc/vpnmanager.service /etc/systemd/system/
chmod +x misc/cron
sudo cp misc/cron /etc/cron.d/vpnmanager
sudo systemctl daemon-reload
sudo systemctl enable vpnmanager
sudo systemctl start vpnmanager