update vagrantfile to work with latest, closes #478

This commit is contained in:
Kyle Drake 2024-01-04 02:30:03 -06:00
parent bc81646302
commit 350a7039c7
5 changed files with 28 additions and 13 deletions

2
Vagrantfile vendored
View file

@ -6,7 +6,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.network :forwarded_port, guest: 9292, host: 9292
config.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '2048']
vb.customize ['modifyvm', :id, '--memory', '8192']
vb.name = 'neocities'
end
end

View file

@ -21,3 +21,9 @@ sed -i 's|UsePAM yes|UsePAM no|g' /etc/ssh/sshd_config
#sed -i 's|[#]*PermitRootLogin yes|PermitRootLogin no|g' /etc/ssh/sshd_config
service ssh restart
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f -y
rm google-chrome-stable_current_amd64.deb

View file

@ -12,10 +12,10 @@ sudo su postgres -c "createuser -d vagrant"
sudo su vagrant -c "createdb neocities"
sudo su vagrant -c "createdb neocities_test"
sudo sh -c 'echo "local all postgres trust" > /etc/postgresql/10/main/pg_hba.conf'
sudo sh -c 'echo "local all all trust" >> /etc/postgresql/10/main/pg_hba.conf'
sudo sh -c 'echo "host all all 127.0.0.1/32 trust" >> /etc/postgresql/10/main/pg_hba.conf'
sudo sh -c 'echo "host all all ::1/128 trust" >> /etc/postgresql/10/main/pg_hba.conf'
sudo sh -c 'echo "local all postgres trust" > /etc/postgresql/14/main/pg_hba.conf'
sudo sh -c 'echo "local all all trust" >> /etc/postgresql/14/main/pg_hba.conf'
sudo sh -c 'echo "host all all 127.0.0.1/32 trust" >> /etc/postgresql/14/main/pg_hba.conf'
sudo sh -c 'echo "host all all ::1/128 trust" >> /etc/postgresql/14/main/pg_hba.conf'
sudo systemctl restart postgresql
# Create empty file for disposable email accounts

View file

@ -1,7 +1,11 @@
#!/bin/bash
apt-get -y install python-software-properties
apt-add-repository -y ppa:brightbox/ruby-ng
apt-get -y update
apt-get -y install ruby2.6 ruby2.6-dev
gem install bundler --no-document
sudo apt-get -y install autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-dev
wget https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0.tar.gz
gzip -dc ruby-3.3.0.tar.gz | tar xf -
cd ruby-3.3.0
./autogen.sh
./configure --enable-yjit --disable-install-doc
make -j && sudo make install
cd ..

View file

@ -29,10 +29,15 @@ apt-get install -y \
sed -i 's|[#]*DetectPUA false|DetectPUA true|g' /etc/clamav/clamd.conf
freshclam
service clamav-freshclam start
service clamav-daemon start
#sudo freshclam
#sudo systemctl start clamav-freshclam
# clamav download mirrors have insanely stupid limits so we just put in a github mirror for now
rm -f main.cvd daily.cld daily.cvd bytecode.cvd main.cvd.sha256 daily.cvd.sha256 bytecode.cvd.sha256 main.cvd.* daily.cvd.* && curl -LSOs https://github.com/ladar/clamav-data/raw/main/main.cvd.[01-10] -LSOs https://github.com/ladar/clamav-data/raw/main/main.cvd.sha256 -LSOs https://github.com/ladar/clamav-data/raw/main/daily.cvd.[01-10] -LSOs https://github.com/ladar/clamav-data/raw/main/daily.cvd.sha256 -LSOs https://github.com/ladar/clamav-data/raw/main/bytecode.cvd -LSOs https://github.com/ladar/clamav-data/raw/main/bytecode.cvd.sha256 && cat main.cvd.01 main.cvd.02 main.cvd.03 main.cvd.04 main.cvd.05 main.cvd.06 main.cvd.07 main.cvd.08 main.cvd.09 main.cvd.10 > main.cvd && cat daily.cvd.01 daily.cvd.02 daily.cvd.03 daily.cvd.04 daily.cvd.05 daily.cvd.06 daily.cvd.07 daily.cvd.08 daily.cvd.09 daily.cvd.10 > daily.cvd && sha256sum -c main.cvd.sha256 daily.cvd.sha256 bytecode.cvd.sha256 || { printf "ClamAV database download failed.\n" ; rm -f main.cvd daily.cvd bytecode.cvd ; } ; rm -f main.cvd.sha256 daily.cvd.sha256 bytecode.cvd.sha256 main.cvd.* daily.cvd.* && sudo mv *.cvd /var/lib/clamav/
sudo systemctl enable clamav-daemon
sudo systemctl start clamav-daemon
usermod -G vagrant clamav
cd /vagrant