diff options
author | Joe Rayhawk <jrayhawk@richardiv.omgwallhack.org> | 2010-10-30 07:31:35 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@richardiv.omgwallhack.org> | 2010-10-30 07:31:35 -0700 |
commit | c952a7e6d5e66e2ecd653bb5c177609b59619808 (patch) | |
tree | d2be5d0dee505ae00c4b85a5f4129efc2456d5f6 /pinyadmin/bin | |
parent | d03e1eb495c79c19dc70bbe8eab81eadce98210a (diff) | |
parent | 79c284badd015f88d8fd42d941e30bca70dd4eb9 (diff) | |
download | piny-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-x | pinyadmin/bin/addaccess | 2 | ||||
-rwxr-xr-x | pinyadmin/bin/appendkeys | 5 | ||||
l--------- | pinyadmin/bin/createuser | 1 | ||||
-rwxr-xr-x | pinyadmin/bin/lsaccess | 30 | ||||
-rwxr-xr-x | pinyadmin/bin/lsrepo | 10 | ||||
-rwxr-xr-x | pinyadmin/bin/newrepo | 2 | ||||
-rwxr-xr-x | pinyadmin/bin/newuser | 2 | ||||
-rwxr-xr-x | pinyadmin/bin/pinyconfig | 2 | ||||
-rwxr-xr-x | pinyadmin/bin/pinyshell | 5 | ||||
-rwxr-xr-x | pinyadmin/bin/readkeys | 3 | ||||
-rwxr-xr-x | pinyadmin/bin/rmaccess | 2 | ||||
-rwxr-xr-x | pinyadmin/bin/rmrepo | 2 | ||||
-rwxr-xr-x | pinyadmin/bin/writekeys | 5 |
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 |