From 3af6677da02f5336d31f5d4abb136a0ca54f6fd6 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Thu, 31 Jan 2019 18:43:53 +0000 Subject: [PATCH] Update setup for cron --- misc/cron | 3 +++ setup.sh | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 misc/cron diff --git a/misc/cron b/misc/cron new file mode 100644 index 0000000..89c2ee5 --- /dev/null +++ b/misc/cron @@ -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) diff --git a/setup.sh b/setup.sh index d9b744e..c330a94 100644 --- a/setup.sh +++ b/setup.sh @@ -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