s
This commit is contained in:
parent
b2353b4349
commit
0315ff2871
5 changed files with 13 additions and 12 deletions
|
@ -16,7 +16,7 @@ apt install -y python3 rclone fuse
|
||||||
cp -n rclone.conf /root/.config/rclone/rclone.conf
|
cp -n rclone.conf /root/.config/rclone/rclone.conf
|
||||||
cp nman.service /etc/systemd/system/
|
cp nman.service /etc/systemd/system/
|
||||||
cp nman.timer /etc/systemd/system/
|
cp nman.timer /etc/systemd/system/
|
||||||
cp mnt-nginx.mount /etc/systemd/system/
|
cp mnt-files.mount /etc/systemd/system/
|
||||||
cp nman /etc/default/
|
cp nman /etc/default/
|
||||||
cp nman.py /opt/
|
cp nman.py /opt/
|
||||||
cp nman.sh /opt/
|
cp nman.sh /opt/
|
||||||
|
@ -27,7 +27,7 @@ systemctl stop nginx
|
||||||
rm -rf /etc/nginx
|
rm -rf /etc/nginx
|
||||||
mkdir /etc/nginx
|
mkdir /etc/nginx
|
||||||
|
|
||||||
systemctl enable --now mnt-nginx.mount
|
systemctl enable --now mnt-files.mount
|
||||||
|
|
||||||
/opt/nman.sh
|
/opt/nman.sh
|
||||||
|
|
||||||
|
|
9
mnt-files.mount
Normal file
9
mnt-files.mount
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=mount
|
||||||
|
Before=nginx.service
|
||||||
|
|
||||||
|
[Mount]
|
||||||
|
Type=rclone
|
||||||
|
What=files:
|
||||||
|
Where=/mnt/files
|
||||||
|
Options=ro,_netdev,allow_other,args2env,config=/root/.config/rclone/rclone.conf,read-only
|
|
@ -1,8 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=nginx mount
|
|
||||||
|
|
||||||
[Mount]
|
|
||||||
Type=rclone
|
|
||||||
What=files:nginx
|
|
||||||
Where=/mnt/nginx
|
|
||||||
Options=ro,_netdev,allow_other,args2env,config=/root/.config/rclone/rclone.conf,read-only
|
|
2
nman.py
2
nman.py
|
@ -2,7 +2,7 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
from hashlib import sha1
|
from hashlib import sha1
|
||||||
|
|
||||||
REMOTE_PATH=os.getenv("REMOTE_PATH", "/mnt/nginx")
|
REMOTE_PATH=os.getenv("REMOTE_PATH", "/mnt/files/nginx")
|
||||||
LOCAL_PATH=os.getenv("LOCAL_PATH", "/etc/nginx")
|
LOCAL_PATH=os.getenv("LOCAL_PATH", "/etc/nginx")
|
||||||
|
|
||||||
ENV={}
|
ENV={}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[files]
|
[files]
|
||||||
type = sftp
|
type = sftp
|
||||||
host =
|
host = # fill me
|
||||||
user = files
|
user = files
|
||||||
key_file = /root/.ssh/id_rsa
|
key_file = /root/.ssh/id_rsa
|
||||||
shell_type = unix
|
shell_type = unix
|
||||||
|
|
Loading…
Reference in a new issue