sffsd
This commit is contained in:
parent
0a593d1009
commit
12e7b5a250
3 changed files with 29 additions and 3 deletions
16
install.sh
16
install.sh
|
@ -1,4 +1,9 @@
|
|||
if [ ! -f /root/.ssh/id_rsa.pub ] then
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo not root
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f /root/.ssh/id_rsa.pub ]; then
|
||||
echo no ssh key, generate: rsa without password
|
||||
exit 1
|
||||
fi
|
||||
|
@ -13,6 +18,7 @@ read
|
|||
apt update
|
||||
apt install -y python3 rclone fuse
|
||||
|
||||
mkdir -p /root/.config/rclone
|
||||
cp -n rclone.conf /root/.config/rclone/rclone.conf
|
||||
cp nman.service /etc/systemd/system/
|
||||
cp nman.timer /etc/systemd/system/
|
||||
|
@ -27,9 +33,15 @@ systemctl stop nginx
|
|||
rm -rf /etc/nginx
|
||||
mkdir /etc/nginx
|
||||
|
||||
mkdir -p /var/www/html
|
||||
mkdir -p /opt/cache/var-www-html
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
systemctl enable --now mnt-files.mount
|
||||
systemctl enable --now var-www-html.mount
|
||||
|
||||
/opt/nman.sh
|
||||
|
||||
systemctl enable nman.timer
|
||||
systemctl enable --now nman.timer
|
||||
systemctl start nginx
|
|
@ -6,3 +6,6 @@ Type=rclone
|
|||
What=files:
|
||||
Where=/mnt/files
|
||||
Options=ro,_netdev,allow_other,args2env,config=/root/.config/rclone/rclone.conf,read-only
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
11
var-www-html.mount
Normal file
11
var-www-html.mount
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=mount
|
||||
|
||||
[Mount]
|
||||
Type=rclone
|
||||
What=files:html
|
||||
Where=/var/www/html
|
||||
Options=ro,_netdev,allow_other,args2env,config=/root/.config/rclone/rclone.conf,read-only,vfs-cache-mode=full,vfs-cache-max-age=6h,vfs-cache-poll-interval=10m,cache-dir=/opt/cache/var-www-html,no-modtime,transfers=16
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue