summaryrefslogtreecommitdiff
path: root/pinyadmin/bin
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2010-10-29 19:46:24 -0500
committerBryan Bishop <kanzure@gmail.com>2010-10-29 19:46:24 -0500
commit7786ce2a332b0eba4b3ca7c57f906a32e8715da3 (patch)
tree5a9fe32b69a93f41ae2ac82a50788fe50c0d86fb /pinyadmin/bin
parent413373be9ab30eb21b564cdc180cb2dcda77bfeb (diff)
downloadpiny-code-7786ce2a332b0eba4b3ca7c57f906a32e8715da3.tar.gz
piny-code-7786ce2a332b0eba4b3ca7c57f906a32e8715da3.zip
Starting repo cleanup to make this not so awful
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