provision.pl added perl pkg instal

This commit is contained in:
gashapwn 2020-11-28 22:59:41 +00:00
parent 4d1480e7c3
commit 606921238d

View File

@ -16,8 +16,8 @@ my $GIT_REPO = 'https://git.lain.church/gashapwn/lyadmin.git';
my ($REPO_DIR) = $GIT_REPO =~ /\/([^\/]*)\.git$/; my ($REPO_DIR) = $GIT_REPO =~ /\/([^\/]*)\.git$/;
my $pwuid; my $pwuid;
my $admin_un;
my $admin_un;
my $admin_home_dir; my $admin_home_dir;
# Make sure we're running as root # Make sure we're running as root
@ -42,10 +42,13 @@ system("echo 'permit $admin_un' > /etc/doas.conf");
# install git # install git
system("pkg_add git"); system("pkg_add git");
system("pkg_add python3");
chdir $admin_home_dir;
system("su gashapwn -c 'git clone $GIT_REPO'"); system("su gashapwn -c 'git clone $GIT_REPO'");
chdir $admin_home_dir;
chdir $REPO_DIR; chdir $REPO_DIR;
# Setup the virtual environment
system("pkg_add python3");
system("su gashapwn -c 'python3 -m venv venv'"); system("su gashapwn -c 'python3 -m venv venv'");
system("su gashapwn -c '. ./venv/bin/activate && pip3 install -r "); system("su gashapwn -c '. ./venv/bin/activate && pip3 install -r ");
system("pkg_add p5-JSON");