Browse Source

create_user.pl + provision.pl - updated usage info stuff

master
gashapwn 3 years ago
parent
commit
de10cf77bc
2 changed files with 8 additions and 3 deletions
  1. +4
    -1
      perl-script/create_user.pl
  2. +4
    -2
      perl-script/provision.pl

+ 4
- 1
perl-script/create_user.pl View File

@@ -114,7 +114,10 @@ if(`pwd` =~ /perl-script\/?\s*$/){
}elsif(!(join(" ", glob("./*")) =~ /perl-script/)){
$SHELL_ENUM = {"SHELL_KSH" => "/bin/ksh"};
create(0);
die "done...\n";
printf("admin user is now configured");
printf("run the below command to continue the install");
printf("pkg_add wget && wget 'https://git.lain.church/gashapwn/lyadmin/raw/branch/master/perl-script/provision.pl' -O - | perl");
die "\n";
}

# Opens the conf file to read


+ 4
- 2
perl-script/provision.pl View File

@@ -32,10 +32,12 @@ if($pwuid ne "root"){

unless( ($admin_un) = `tail /etc/passwd | grep -v "nobody:"` =~ /([^:\n]+):[^:]+:[0-9]{4,}/){
system("pkg_add p5-JSON");
`wget --quiet https://git.lain.church/gashapwn/lyadmin/raw/branch/gasha-branch/perl-script/create_user.pl -O create_admin.pl`;
printf("run create_admin.pl to create an admin user\n");
die "or add with useradd and add an ssh key to ~/.ssh/authorizedkeys\n";
printf("to provision the instance there must be a non root user with an authorized_keys file");
printf("run create_admin.pl to create an admin user\n");
die "or add with useradd and add an ssh key to ~/.ssh/authorized_keys\n";
}

# install git


Loading…
Cancel
Save