<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tobias-Conradi &#187; Skript</title>
	<atom:link href="http://tobias-conradi.de/index.php/tag/skript/feed/" rel="self" type="application/rss+xml" />
	<link>http://tobias-conradi.de</link>
	<description></description>
	<lastBuildDate>Sun, 11 Dec 2011 11:48:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>FolderAction: chmod public and attach to subfolders</title>
		<link>http://tobias-conradi.de/index.php/2010/10/02/folderaction-chmod-public-and-attach-to-subfolders/</link>
		<comments>http://tobias-conradi.de/index.php/2010/10/02/folderaction-chmod-public-and-attach-to-subfolders/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 17:30:27 +0000</pubDate>
		<dc:creator>toco</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Apple-Script]]></category>
		<category><![CDATA[Folder Action]]></category>
		<category><![CDATA[OS-X]]></category>
		<category><![CDATA[Skript]]></category>

		<guid isPermaLink="false">http://tobias-conradi.de/?p=176</guid>
		<description><![CDATA[Hier ein Apple-Script, dass als Folder-Action an einen Ordner angefügt werden kann. Wenn eine Datei oder ein Ordner in den Ordner gelegt wird, werden automatisch die Zugriffsrechte für allen Unterobjekten auf Lese- und Schreibzugriff für alle Benutzer geändert (chmod 777), zusätzlich wird an jeden Unterordner das Skript als Folder-Action angefügt. Das Skript kann zum Beispiel [...]]]></description>
			<content:encoded><![CDATA[<p>Hier ein Apple-Script, dass als Folder-Action an einen Ordner angefügt werden kann.</p>
<p>Wenn eine Datei oder ein Ordner in den Ordner gelegt wird, werden automatisch die Zugriffsrechte für allen Unterobjekten auf Lese- und Schreibzugriff für alle Benutzer geändert (chmod 777), zusätzlich wird an jeden Unterordner das Skript als Folder-Action angefügt.</p>
<p>Das Skript kann zum Beispiel dazu genutzt werden auf einem File-Server alle Objekte in einer Freigabe für alle Benutzer les- und schreibbar zu halten, auch wenn ein Benutzer ausversehen ein Objekt mit &#8220;falschen&#8221; Zugriffsrechten in den Ordner kopiert.</p>
<pre class="brush: objc; title: ; wrap-lines: false; notranslate">
on adding folder items to this_folder after receiving added_items
	tell application &quot;Finder&quot;
		repeat with this_item in added_items
			my theScript(this_item)
			my subfolders(this_item)
		end repeat
	end tell
end adding folder items to

on subfolders(this_folder)
	tell application &quot;Finder&quot;
		repeat with each_folder in (get every folder of this_folder)
			my theScript(each_folder)
			my subfolders(each_folder)
		end repeat
	end tell
end subfolders

on theScript(action_folder)
	set script_file to ((path to library folder as Unicode text) &amp; &quot;Scripts:Folder Action Scripts:chmodPublic_and_addScript.scpt&quot; as Unicode text)
	tell application &quot;System Events&quot;
		attach action to (action_folder as alias) using (script_file as alias)
	end tell

	set posix_path to quoted form of POSIX path of action_folder as string
	set ScriptReturn to do shell script &quot;/bin/chmod -R -f 777 &quot; &amp; posix_path

end theScript
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tobias-conradi.de/index.php/2010/10/02/folderaction-chmod-public-and-attach-to-subfolders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OS-X und OpenVPN mit DNS-Push</title>
		<link>http://tobias-conradi.de/index.php/2010/03/21/os-x-und-openvpn-mit-dns-push/</link>
		<comments>http://tobias-conradi.de/index.php/2010/03/21/os-x-und-openvpn-mit-dns-push/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 16:15:11 +0000</pubDate>
		<dc:creator>toco</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[openVPN]]></category>
		<category><![CDATA[OS-X]]></category>
		<category><![CDATA[Skript]]></category>

		<guid isPermaLink="false">http://tobias-conradi.de/?p=32</guid>
		<description><![CDATA[Wenn man bei OpenVPN den DNS-Server auf der anderen Tunnelseite benutzen möchte, ging es mit unter 10.4 und 10.5 Problemlos, doch seit 10.6 wird der lokale DNS-Server ersetzt. Deshalb geht dann die Namensauflösung von externen Server nicht mehr oder nur noch sehr langsam über das VPN.In der Dokumentation von http://code.google.com/p/tunnelblick/wiki/QuickStartGuide steht, dass man wenn man beide [...]]]></description>
			<content:encoded><![CDATA[<p>Wenn man bei OpenVPN den DNS-Server auf der anderen Tunnelseite benutzen möchte, ging es mit</p>
<pre class="brush: plain; title: ; notranslate">
push &quot;dhcp-option DNS 10.66.0.4&quot;
push &quot;dhcp-option DNS 10.66.0.5&quot;
push &quot;dhcp-option WINS 10.66.0.8&quot;
</pre>
<p>unter 10.4 und 10.5 Problemlos, doch seit 10.6 wird der lokale DNS-Server ersetzt. Deshalb geht dann die Namensauflösung von externen Server nicht mehr oder nur noch sehr langsam über das VPN.In der Dokumentation von <a title="http://code.google.com/p/tunnelblick/wiki/QuickStartGuide" href="http://code.google.com/p/tunnelblick/wiki/QuickStartGuide#The_Set_Nameserver_Check_Box_and_DNS_and_WINS_Settings" target="_blank">http://code.google.com/p/tunnelblick/wiki/QuickStartGuide</a> steht, dass man wenn man beide DNS-Server nutzen möchte, ein dazu passendes Skript schreiben muss.</p>
<p>Da ich meinen lokalen und den DNS-Server auf der anderen Tunnelseite nutzen möchte, muss ich mein eigenes Skript schreiben. Das Skript konfiguriert welcher DNS-Server für die gegebene Domain benutzt werden soll.</p>
<div>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
####
# The script sets/deletes the DNS-Server to use for a given domain
# by Tobias Conradi Mar 21 2010
# www.tobias-conradi.de
#####
if [ &quot;$1&quot; = &quot;add&quot; ]
then
mkdir -p /etc/resolver &gt; /dev/null
echo &quot;nameserver $3&quot; &gt; /etc/resolver/$2
elif [ &quot;$1&quot; = &quot;delete&quot; ]
then
rm -Rf /etc/resolver/$2
fi
if [ &quot;$1&quot; = &quot;add&quot; ] || [ &quot;$1&quot; = &quot;delete&quot; ]
then
killall DirectoryService
exit 0
else
echo &quot;Error&quot;
echo &quot;Usage: $0 add|delete mydomain.de 192.168.1.1&quot;
fi
</pre>
</div>
<div>Das Skript muss unter einem Pfad gespeichert werden, der für Tunnelblick und OpenVPN erreichbar ist.</div>
<div>Dann muss in die Konfigurationsdatei des Tunnels das Skript als up- und down-Skript eingetragen werden.</div>
<div>Bsp.:</div>
<div>
<pre class="brush: plain; title: ; notranslate">
up &quot;/Applications/Utilities/Tunnelblick.app/Contents/Resources/set-DNS.sh add mydomain.de 192.168.66.2&quot;
down &quot;/Applications/Utilities/Tunnelblick.app/Contents/Resources/set-DNS.sh delete mydomain.de&quot;
</pre>
</div>
<p>Jetzt noch in Tunnelblick &#8220;Nameserver festlegen&#8221; deaktivieren und schon müssten beide DNS-Server funktionieren.</p>
<p>Links:<br />
<a href="http://www.openvpn.net/">OpenVPN</a><br />
<a href="http://code.google.com/p/tunnelblick/">Tunnelblick</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tobias-conradi.de/index.php/2010/03/21/os-x-und-openvpn-mit-dns-push/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

