Compare commits

...

2 Commits

Author SHA1 Message Date
gashapwn
fa7205481b provision.pl added repo clone command 2020-11-28 21:51:19 +00:00
gashapwn
f3021964de added doas.conf 2020-11-28 20:57:25 +00:00

View File

@ -12,10 +12,13 @@ use strict;
# gashapwn
# Nov 2020
my $GIT_REPO = 'https://git.lain.church/gashapwn/lyadmin.git';
my $pwuid;
my $admin_un;
my $admin_home_dir;
# Make sure we're running as root
$pwuid = getpwuid( $< );
@ -32,3 +35,13 @@ if( ($admin_un) = `tail /etc/passwd | grep -v "nobody:"` =~ /([^:\n]+):[^:]+:[0-
die "create a non-root user & set user passsword before running this script."
}
$admin_home_dir = "/home/$admin_un";
# grant doas access to admin user
system("echo 'permit $admin_un' > /etc/doas.conf");
# install git
system("pkg_add git");
chdir $admin_home_dir;
system("su gashapwn -c 'git clone $GIT_REPO'");