diff --git a/install.sh b/install.sh index 1cfdfcb..e999418 100644 --- a/install.sh +++ b/install.sh @@ -16,7 +16,7 @@ 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 mnt-files.mount /etc/systemd/system/ cp nman /etc/default/ cp nman.py /opt/ cp nman.sh /opt/ @@ -27,7 +27,7 @@ systemctl stop nginx rm -rf /etc/nginx mkdir /etc/nginx -systemctl enable --now mnt-nginx.mount +systemctl enable --now mnt-files.mount /opt/nman.sh diff --git a/mnt-files.mount b/mnt-files.mount new file mode 100644 index 0000000..d921064 --- /dev/null +++ b/mnt-files.mount @@ -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 \ No newline at end of file diff --git a/mnt-nginx.mount b/mnt-nginx.mount deleted file mode 100644 index db39315..0000000 --- a/mnt-nginx.mount +++ /dev/null @@ -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 \ No newline at end of file diff --git a/nman.py b/nman.py index 241a90e..eda0c01 100644 --- a/nman.py +++ b/nman.py @@ -2,7 +2,7 @@ import os import shutil 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") ENV={} diff --git a/rclone.conf b/rclone.conf index 9480900..925f387 100644 --- a/rclone.conf +++ b/rclone.conf @@ -1,6 +1,6 @@ [files] type = sftp -host = +host = # fill me user = files key_file = /root/.ssh/id_rsa shell_type = unix