summaryrefslogtreecommitdiffstats
path: root/Reaktor
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-08-28 23:39:37 +0200
committermakefu <github@syntax-fehler.de>2015-08-28 23:39:37 +0200
commite5c6eae9896aeda68204bb7010a6e4e26d7eaca1 (patch)
tree0dcc367de6f6c1d978cabe3c3275395b1a1757b3 /Reaktor
parent60367f4b7bf02b8c2ec074c5ccba6772d175caa9 (diff)
Reaktor: add nix support, packaging
Diffstat (limited to 'Reaktor')
-rw-r--r--Reaktor/README.md25
-rw-r--r--Reaktor/Reaktor.nix15
l---------Reaktor/commands/revip1
l---------Reaktor/commands/subdomains1
l---------Reaktor/commands/visit-page1
-rw-r--r--Reaktor/default.nix15
-rwxr-xr-xReaktor/reaktor/commands/badcommand (renamed from Reaktor/commands/badcommand)0
-rwxr-xr-xReaktor/reaktor/commands/caps (renamed from Reaktor/commands/caps)0
-rwxr-xr-xReaktor/reaktor/commands/hello (renamed from Reaktor/commands/hello)0
-rwxr-xr-xReaktor/reaktor/commands/identify (renamed from Reaktor/commands/identify)0
-rwxr-xr-xReaktor/reaktor/commands/licht_resolver (renamed from Reaktor/commands/licht_resolver)0
-rwxr-xr-xReaktor/reaktor/commands/nag (renamed from Reaktor/commands/nag)0
-rwxr-xr-xReaktor/reaktor/commands/reload (renamed from Reaktor/commands/reload)0
-rwxr-xr-xReaktor/reaktor/commands/respond (renamed from Reaktor/commands/respond)0
-rwxr-xr-xReaktor/reaktor/commands/rev (renamed from Reaktor/commands/rev)0
-rwxr-xr-xReaktor/reaktor/commands/say (renamed from Reaktor/commands/say)0
-rwxr-xr-xReaktor/reaktor/commands/taken (renamed from Reaktor/commands/taken)0
-rwxr-xr-xReaktor/reaktor/commands/tell-on_join (renamed from Reaktor/commands/tell-on_join)0
-rwxr-xr-xReaktor/reaktor/commands/tell-on_privmsg (renamed from Reaktor/commands/tell-on_privmsg)0
-rwxr-xr-xReaktor/reaktor/commands/uptime (renamed from Reaktor/commands/uptime)0
-rwxr-xr-xReaktor/reaktor/commands/whatweb (renamed from Reaktor/commands/whatweb)0
-rwxr-xr-xReaktor/reaktor/commands/whois (renamed from Reaktor/commands/whois)0
22 files changed, 34 insertions, 24 deletions
diff --git a/Reaktor/README.md b/Reaktor/README.md
index a581c6bd..af14d96b 100644
--- a/Reaktor/README.md
+++ b/Reaktor/README.md
@@ -2,25 +2,8 @@
## Quickstart
- ## 1. create a dedicated user
- useradd reaktor
+ pip install -e .
+ useradd reaktor -m /opt/Reaktor
+ sudo -u reaktor reaktor run
- ## 2. marry Reaktor with /sbin/init
-
- ## 2a. /etc/inittab-like foo
- echo 10:2345:respawn:/bin/su reaktor -c /krebs/Reaktor/index >>/etc/inittab
- # or 10:2345:respawn:/usr/bin/sudo -u reaktor /krebs/Reaktor/index
- # if reaktor's shell is /bin/false or similar
- # [check with e.g getent passwd reaktor]
- telinit q
-
- ## 2b. upstart-like foo
-
- cat > /etc/init/Reaktor.conf <<EOF
- description "Krebs Reaktor"
- author "The Ministerium"
- stop on runlevel [016]
- respawn
- exec /usr/bin/sudo -u reaktor /krebs/Reaktor/index
- EOF
- start Reaktor
+## autostart
diff --git a/Reaktor/Reaktor.nix b/Reaktor/Reaktor.nix
new file mode 100644
index 00000000..b804b44a
--- /dev/null
+++ b/Reaktor/Reaktor.nix
@@ -0,0 +1,15 @@
+with import <nixpkgs> {};
+# nix-build Reaktor.nix
+# result/bin/reaktor
+
+buildPythonPackage rec {
+ name = "Reaktor-${version}";
+ version = "0.2.6";
+ propagatedBuildInputs = with pkgs.pythonPackages;[
+ pythonPackages.docopt
+ ];
+ src = fetchurl {
+ url = "https://pypi.python.org/packages/source/R/Reaktor/Reaktor-0.2.6.tar.gz";
+ sha256 = "1dksw1s1n2hxvnga6pygjr174dywncr0wiggkrkn1srbn2amh1c2";
+ };
+}
diff --git a/Reaktor/commands/revip b/Reaktor/commands/revip
deleted file mode 120000
index e2c3b7ab..00000000
--- a/Reaktor/commands/revip
+++ /dev/null
@@ -1 +0,0 @@
-../repos/revip/revip \ No newline at end of file
diff --git a/Reaktor/commands/subdomains b/Reaktor/commands/subdomains
deleted file mode 120000
index 0489555f..00000000
--- a/Reaktor/commands/subdomains
+++ /dev/null
@@ -1 +0,0 @@
-../repos/consolidate_dns/index \ No newline at end of file
diff --git a/Reaktor/commands/visit-page b/Reaktor/commands/visit-page
deleted file mode 120000
index 8723336b..00000000
--- a/Reaktor/commands/visit-page
+++ /dev/null
@@ -1 +0,0 @@
-../repos/view-website/runner.sh \ No newline at end of file
diff --git a/Reaktor/default.nix b/Reaktor/default.nix
new file mode 100644
index 00000000..96e3b120
--- /dev/null
+++ b/Reaktor/default.nix
@@ -0,0 +1,15 @@
+with import <nixpkgs> {};
+# nix-shell --pure .
+stdenv.mkDerivation rec {
+ name = "Reaktor-${version}";
+ version = "0.2.6";
+ buildInputs = with pkgs;[
+ python34
+ python34Packages.docopt
+ ];
+
+ shellHook =''
+ [ ! -d venv ] && virtualenv --python=python3.4 venv
+ . venv/bin/activate
+ '' ;
+}
diff --git a/Reaktor/commands/badcommand b/Reaktor/reaktor/commands/badcommand
index c59b4d1c..c59b4d1c 100755
--- a/Reaktor/commands/badcommand
+++ b/Reaktor/reaktor/commands/badcommand
diff --git a/Reaktor/commands/caps b/Reaktor/reaktor/commands/caps
index ac8cc66d..ac8cc66d 100755
--- a/Reaktor/commands/caps
+++ b/Reaktor/reaktor/commands/caps
diff --git a/Reaktor/commands/hello b/Reaktor/reaktor/commands/hello
index 05ed79b5..05ed79b5 100755
--- a/Reaktor/commands/hello
+++ b/Reaktor/reaktor/commands/hello
diff --git a/Reaktor/commands/identify b/Reaktor/reaktor/commands/identify
index c2fb2c58..c2fb2c58 100755
--- a/Reaktor/commands/identify
+++ b/Reaktor/reaktor/commands/identify
diff --git a/Reaktor/commands/licht_resolver b/Reaktor/reaktor/commands/licht_resolver
index 5bdb6510..5bdb6510 100755
--- a/Reaktor/commands/licht_resolver
+++ b/Reaktor/reaktor/commands/licht_resolver
diff --git a/Reaktor/commands/nag b/Reaktor/reaktor/commands/nag
index f2141392..f2141392 100755
--- a/Reaktor/commands/nag
+++ b/Reaktor/reaktor/commands/nag
diff --git a/Reaktor/commands/reload b/Reaktor/reaktor/commands/reload
index bfa1f041..bfa1f041 100755
--- a/Reaktor/commands/reload
+++ b/Reaktor/reaktor/commands/reload
diff --git a/Reaktor/commands/respond b/Reaktor/reaktor/commands/respond
index e23dc3ef..e23dc3ef 100755
--- a/Reaktor/commands/respond
+++ b/Reaktor/reaktor/commands/respond
diff --git a/Reaktor/commands/rev b/Reaktor/reaktor/commands/rev
index a8681ab9..a8681ab9 100755
--- a/Reaktor/commands/rev
+++ b/Reaktor/reaktor/commands/rev
diff --git a/Reaktor/commands/say b/Reaktor/reaktor/commands/say
index 8b83c056..8b83c056 100755
--- a/Reaktor/commands/say
+++ b/Reaktor/reaktor/commands/say
diff --git a/Reaktor/commands/taken b/Reaktor/reaktor/commands/taken
index b8beba68..b8beba68 100755
--- a/Reaktor/commands/taken
+++ b/Reaktor/reaktor/commands/taken
diff --git a/Reaktor/commands/tell-on_join b/Reaktor/reaktor/commands/tell-on_join
index 2dbff41a..2dbff41a 100755
--- a/Reaktor/commands/tell-on_join
+++ b/Reaktor/reaktor/commands/tell-on_join
diff --git a/Reaktor/commands/tell-on_privmsg b/Reaktor/reaktor/commands/tell-on_privmsg
index 5d0aff41..5d0aff41 100755
--- a/Reaktor/commands/tell-on_privmsg
+++ b/Reaktor/reaktor/commands/tell-on_privmsg
diff --git a/Reaktor/commands/uptime b/Reaktor/reaktor/commands/uptime
index 7ff64168..7ff64168 100755
--- a/Reaktor/commands/uptime
+++ b/Reaktor/reaktor/commands/uptime
diff --git a/Reaktor/commands/whatweb b/Reaktor/reaktor/commands/whatweb
index 36711efa..36711efa 100755
--- a/Reaktor/commands/whatweb
+++ b/Reaktor/reaktor/commands/whatweb
diff --git a/Reaktor/commands/whois b/Reaktor/reaktor/commands/whois
index b0733891..b0733891 100755
--- a/Reaktor/commands/whois
+++ b/Reaktor/reaktor/commands/whois