<commit_before>#
# Cookbook Name:: vpn-server
# Recipe:: default
#
# Copyright 2016, EveryWare AG
#
# All rights reserved - Do Not Redistribute
#

# Wrapper Cookbook für das "openvpn" Cookbook

# Rufe das openvpn::default Recipe auf
include_recipe 'openvpn'

# server.up.d Script für iptables anlegen
template "server.up.d/iptables-nat Script" do
    source 'openvpn/server.up.d/iptables-nat.sh'
    path '/etc/openvpn/server.up.d/iptables-nat.sh'

    owner 'root'
    group 'root'
    mode '0644'
    
    notifies :restart, 'service[openvpn]'
end # of template "server.up.d/iptables-nat Script" do

# Rakefile für die Erzeugung von .ovpn Dateien erstellen
template "/etc/openvpn/easy-rsa/Rakefile-ovpn" do
    source "openvpn/Rakefile-ovpn.erb"

    owner 'root'
    group 'root'
    mode  '0755'
end

# Verzeichnis für User Conf
directory node['openvpn']['key_dir'] + '/../user-conf' do
    owner 'root'
    group 'root'
    mode '0755'
end # of directory default['openvpn']['key_dir'] + '/../user-conf' do

# "rake" Paket wird benötigt
package 'rake' do
    action :install
end # of package 'rake' do
# EOF
<commit_msg>OpenVPN Verzeichnis erzeugen.<commit_after>#
# Cookbook Name:: vpn-server
# Recipe:: default
#
# Copyright 2016, EveryWare AG
#
# All rights reserved - Do Not Redistribute
#

# Wrapper Cookbook für das "openvpn" Cookbook

# Verzeichnisse erzeugen - rekursiv.
[node['openvpn']['key_dir'], node['openvpn']['key_dir'] + '/../user-conf'].each do |dir|
    directory dir do
        owner 'root'
        group 'root'
        mode '0755'

        recursive true
    end # of directory dir do
end # of [node['openvpn']['key_dir'], node['openvpn']['key_dir'] + '/../user-conf'].each do |dir|

# Rufe das openvpn::default Recipe auf
include_recipe 'openvpn'

# server.up.d Script für iptables anlegen
template "server.up.d/iptables-nat Script" do
    source 'openvpn/server.up.d/iptables-nat.sh'
    path '/etc/openvpn/server.up.d/iptables-nat.sh'

    owner 'root'
    group 'root'
    mode '0644'
    
    notifies :restart, 'service[openvpn]'
end # of template "server.up.d/iptables-nat Script" do

# Rakefile für die Erzeugung von .ovpn Dateien erstellen
template "/etc/openvpn/easy-rsa/Rakefile-ovpn" do
    source "openvpn/Rakefile-ovpn.erb"

    owner 'root'
    group 'root'
    mode  '0755'
end

# "rake" Paket wird benötigt
package 'rake' do
    action :install
end # of package 'rake' do

# EOF

{'fraction_non_alphanumeric': 0.13140495867768595, 'fraction_numerical': 0.013223140495867768, 'mean_word_length': 3.425959780621572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7140257', 'n_tokens_mistral': 914, 'n_tokens_neox': 889, 'n_words': 237}