46 lines
846 B
Bash
Executable file
46 lines
846 B
Bash
Executable file
#!/bin/sh
|
|
|
|
cd /root
|
|
|
|
mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
|
|
|
|
mysqld_safe &
|
|
|
|
sleep 5
|
|
|
|
gzip -d mastostart_non_popolato.sql.gz
|
|
|
|
mysql -e 'source mastostart_non_popolato.sql'
|
|
|
|
mysql -e 'source create_user.sql'
|
|
|
|
git clone https://git.lattuga.net/pongrebio/MastodonStartpage.git
|
|
|
|
mkdir /var/www/mastodon.help
|
|
|
|
rsync -av MastodonStartpage/web/ /var/www/mastodon.help/
|
|
|
|
cp /var/www/mastodon.help/mustard/sec/mustard.ini.sample /var/www/mastodon.help/mustard/sec/mustard.ini
|
|
|
|
chown apache /etc/php7/msmtprc
|
|
|
|
chmod go-r /etc/php7/msmtprc
|
|
|
|
chown apache /var/log/apache2/
|
|
|
|
ssh-keygen -A
|
|
|
|
addgroup pongi
|
|
|
|
adduser -g "Pongrèbio" -G pongi -D pongi
|
|
|
|
passwd -d pongi
|
|
|
|
adduser pongi wheel
|
|
|
|
mkdir /home/pongi/.ssh
|
|
mv /root/authorized_keys /home/pongi/.ssh
|
|
chown -R pongi:pongi /home/pongi/.ssh
|
|
chmod go-rx /home/pongi/.ssh
|
|
|
|
exit 0
|