on tietar
backup /etc/openvpn
folder:
$ sudo tar ctzf openvpn-backup.tar.gz /etc/openvpn
# coding: utf-8 | |
from publicdb.histograms.models import DailyHistogram | |
from publicdb.histograms.models import Summary | |
import datetime | |
first = datetime.date(2019, 3, 1) | |
last = datetime.date.today() | |
sums = Summary.objects.filter(date__gte=first, date__lte=last) | |
for summary in sums: | |
#print(summary) | |
try: |
D:\>cd Python27 | |
D:\Python27>python lib\site.py | |
sys.path = [ | |
'D:\\Python27\\lib', | |
'D:\\github\\station-software\\user\\pythonshared', | |
'D:\\Python27\\python27.zip', | |
'D:\\Python27\\DLLs', | |
'D:\\Python27\\lib\\plat-win', | |
'D:\\Python27\\lib\\lib-tk', |
#https://bugs.python.org/issue29759 | |
#https://github.com/HiSPARC/publicdb/issues/242 | |
import logging | |
import multiprocessing.pool | |
import signal | |
import time | |
def foo(num): | |
return num * num |
- hosts: localhost | |
connection: local | |
become: yes | |
become_user: root | |
roles: | |
- nagios |
cert = open('ca.crt').read() | |
with open('create_cert.bat', 'w') as batchfile: | |
batchfile.write("@echo off\n(") | |
for line in cert.split('\n'): | |
if line: | |
batchfile.write("echo %s\n" % line) | |
batchfile.write(")>new_cert.crt") |
Er zijn twee VPNs:
OpenVPN configs staan op tietar in /etc/openvpn
from __future__ import print_function | |
import datetime | |
import hashlib | |
import requests | |
import glob | |
import os | |
import pickle |
from __future__ import print_function | |
import os | |
import sys | |
from datetime import date | |
from sapphire.utils import pbar | |
PUBLICDB_PATH = '/srv/publicdb/www' | |
sys.path.append(PUBLICDB_PATH) |