From 60caba003b052a13b7d6fbc942f7b0139ef955fd Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 6 Jul 2020 16:44:02 +0200 Subject: Added some scripts --- gitjoe-rmuser.pl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 gitjoe-rmuser.pl (limited to 'gitjoe-rmuser.pl') diff --git a/gitjoe-rmuser.pl b/gitjoe-rmuser.pl new file mode 100644 index 0000000..f84dbc6 --- /dev/null +++ b/gitjoe-rmuser.pl @@ -0,0 +1,28 @@ +#!/usr/local/bin/perl + +use strict; +use warnings; +use Term::ANSIColor; + +sub main { + my $argc = $#ARGV + 1; + if ($argc < 1) { + print colored("Failed!\n", 'bold red') + . "Missing argument, 1 needed " + . colored("[user]", 'bold') + . "\n"; + exit 1; + } + my $usr = $ARGV[0]; + system( + '/usr/local/bin/dash', + '-c', + "rmuser << EOF +" . $usr . " +y +y +EOF" + ); +} + +main(); -- cgit v1.2.3