scripts/install.sh

34 lines
670 B
Bash

if [ ! -f /root/.ssh/id_rsa.pub ] then
echo no ssh key, generate: rsa without password
exit 1
fi
echo
echo Add the following key to your remote sftp:
cat /root/.ssh/id_rsa.pub
echo
echo Press enter to continue
read
apt update
apt install -y python3 rclone fuse
cp -n rclone.conf /root/.config/rclone/rclone.conf
cp nman.service /etc/systemd/system/
cp nman.timer /etc/systemd/system/
cp mnt-nginx.mount /etc/systemd/system/
cp nman /etc/default/
cp nman.py /opt/
cp nman.sh /opt/
chmod +x /opt/nman.sh
systemctl stop nginx
rm -rf /etc/nginx
mkdir /etc/nginx
systemctl enable --now mnt-nginx.mount
/opt/nman.sh
systemctl enable nman.timer
systemctl start nginx