some scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1019 B

#!/bin/bash
# all steps for gitea on raspi3 on Pi OS
apt install -y git vim
wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/1.13.2/gitea-1.13.2-linux-arm-6
chmod +x /usr/local/bin/gitea
adduser \
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git
mkdir -p /var/lib/gitea/{custom,data,log}
chown -R git:git /var/lib/gitea/
chmod -R 750 /var/lib/gitea/
mkdir -p /etc/gitea
touch /etc/gitea/app.ini
chown -R root:git /etc/gitea
chmod -R 770 /etc/gitea
cat > /etc/systemd/system/gitea.service << EOF
[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target
[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
[Install]
WantedBy=multi-user.target
EOF
systemctl enable gitea.service
systemctl start gitea