summaryrefslogtreecommitdiff
path: root/pinyadmin/bin
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@richardiv.omgwallhack.org>2010-10-30 07:31:35 -0700
committerJoe Rayhawk <jrayhawk@richardiv.omgwallhack.org>2010-10-30 07:31:35 -0700
commitc952a7e6d5e66e2ecd653bb5c177609b59619808 (patch)
treed2be5d0dee505ae00c4b85a5f4129efc2456d5f6 /pinyadmin/bin
parentd03e1eb495c79c19dc70bbe8eab81eadce98210a (diff)
parent79c284badd015f88d8fd42d941e30bca70dd4eb9 (diff)
downloadpiny-code-c952a7e6d5e66e2ecd653bb5c177609b59619808.tar.gz
piny-code-c952a7e6d5e66e2ecd653bb5c177609b59619808.zip
Merge branch 'master' of piny.be:/srv/git/piny-code
Diffstat (limited to 'pinyadmin/bin')
-rwxr-xr-xpinyadmin/bin/addaccess2
-rwxr-xr-xpinyadmin/bin/appendkeys5
l---------pinyadmin/bin/createuser1
-rwxr-xr-xpinyadmin/bin/lsaccess30
-rwxr-xr-xpinyadmin/bin/lsrepo10
-rwxr-xr-xpinyadmin/bin/newrepo2
-rwxr-xr-xpinyadmin/bin/newuser2
-rwxr-xr-xpinyadmin/bin/pinyconfig2
-rwxr-xr-xpinyadmin/bin/pinyshell5
-rwxr-xr-xpinyadmin/bin/readkeys3
-rwxr-xr-xpinyadmin/bin/rmaccess2
-rwxr-xr-xpinyadmin/bin/rmrepo2
-rwxr-xr-xpinyadmin/bin/writekeys5
13 files changed, 71 insertions, 0 deletions
diff --git a/pinyadmin/bin/addaccess b/pinyadmin/bin/addaccess
new file mode 100755
index 0000000..849119d
--- /dev/null
+++ b/pinyadmin/bin/addaccess
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/sudo /usr/sbin/addaccess "$@"
diff --git a/pinyadmin/bin/appendkeys b/pinyadmin/bin/appendkeys
new file mode 100755
index 0000000..a4b7d98
--- /dev/null
+++ b/pinyadmin/bin/appendkeys
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+/bin/mkdir -p ~/.ssh
+/bin/echo Please input authorized keys to be appended. ctrl-d to finish, ctrl-c to abort current line.
+/bin/cat >> ~/.ssh/authorized_keys
diff --git a/pinyadmin/bin/createuser b/pinyadmin/bin/createuser
new file mode 120000
index 0000000..e9d7937
--- /dev/null
+++ b/pinyadmin/bin/createuser
@@ -0,0 +1 @@
+newuser \ No newline at end of file
diff --git a/pinyadmin/bin/lsaccess b/pinyadmin/bin/lsaccess
new file mode 100755
index 0000000..ce41fc4
--- /dev/null
+++ b/pinyadmin/bin/lsaccess
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Piny;
+
+my $env = Piny::Environment->instance( );
+
+my ( $reponame ) = @ARGV;
+
+if ( defined $reponame ) {
+
+ my $repo = Piny::Repo->new( $reponame );
+
+ foreach my $user ( Piny::User->all_users( ) ) {
+ if ( $repo->has_access( $user ) ) {
+ print $user->name . "\n";
+ };
+ };
+
+} else {
+
+ foreach my $repo ( Piny::Repo->all_repos( ) ) {
+ if ( $repo->has_access( $env->user ) ) {
+ print $repo->name . "\n";
+ };
+ };
+
+};
diff --git a/pinyadmin/bin/lsrepo b/pinyadmin/bin/lsrepo
new file mode 100755
index 0000000..2d88eb5
--- /dev/null
+++ b/pinyadmin/bin/lsrepo
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Piny;
+
+foreach my $repo ( Piny::Repo->all_repos( ) ) {
+ print $repo->name . "\n";
+};
diff --git a/pinyadmin/bin/newrepo b/pinyadmin/bin/newrepo
new file mode 100755
index 0000000..025e0cf
--- /dev/null
+++ b/pinyadmin/bin/newrepo
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/sudo /usr/sbin/newrepo "$@"
diff --git a/pinyadmin/bin/newuser b/pinyadmin/bin/newuser
new file mode 100755
index 0000000..1f73ed6
--- /dev/null
+++ b/pinyadmin/bin/newuser
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/sudo /usr/sbin/newuser
diff --git a/pinyadmin/bin/pinyconfig b/pinyadmin/bin/pinyconfig
new file mode 100755
index 0000000..4e54f76
--- /dev/null
+++ b/pinyadmin/bin/pinyconfig
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/sudo /usr/sbin/pinyconfig "$@"
diff --git a/pinyadmin/bin/pinyshell b/pinyadmin/bin/pinyshell
new file mode 100755
index 0000000..0db88a8
--- /dev/null
+++ b/pinyadmin/bin/pinyshell
@@ -0,0 +1,5 @@
+#!/bin/sh
+cd /srv/rbin
+export PATH=/srv/rbin
+
+exec /bin/rbash "$@"
diff --git a/pinyadmin/bin/readkeys b/pinyadmin/bin/readkeys
new file mode 100755
index 0000000..745bd8d
--- /dev/null
+++ b/pinyadmin/bin/readkeys
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/bin/cat ~/.ssh/authorized_keys
diff --git a/pinyadmin/bin/rmaccess b/pinyadmin/bin/rmaccess
new file mode 100755
index 0000000..665052c
--- /dev/null
+++ b/pinyadmin/bin/rmaccess
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/sudo /usr/sbin/rmaccess "$@"
diff --git a/pinyadmin/bin/rmrepo b/pinyadmin/bin/rmrepo
new file mode 100755
index 0000000..e0e8085
--- /dev/null
+++ b/pinyadmin/bin/rmrepo
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/sudo /usr/sbin/rmrepo "$@"
diff --git a/pinyadmin/bin/writekeys b/pinyadmin/bin/writekeys
new file mode 100755
index 0000000..61a7760
--- /dev/null
+++ b/pinyadmin/bin/writekeys
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+/bin/mkdir -p ~/.ssh
+/bin/echo Please input all authorized keys. ctrl-d to finish, ctrl-c to abort.
+/usr/bin/sponge ~/.ssh/authorized_keys