tidy up servo /mnt points
now we maintain /mnt/servo-media as a link to the "fastest" mountpoint
This commit is contained in:
parent
7535986932
commit
dfb7c997bb
|
@ -17,11 +17,11 @@ let sshOpts = {
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
fileSystems."/mnt/media-uninsane" = {
|
fileSystems."/mnt/servo-media-wan" = {
|
||||||
device = "colin@uninsane.org:/opt/uninsane/media";
|
device = "colin@uninsane.org:/opt/uninsane/media";
|
||||||
inherit (sshOpts) fsType options;
|
inherit (sshOpts) fsType options;
|
||||||
};
|
};
|
||||||
fileSystems."/mnt/media-uninsane-lan" = {
|
fileSystems."/mnt/servo-media-lan" = {
|
||||||
device = "colin@servo:/opt/uninsane/media";
|
device = "colin@servo:/opt/uninsane/media";
|
||||||
inherit (sshOpts) fsType options;
|
inherit (sshOpts) fsType options;
|
||||||
};
|
};
|
||||||
|
|
18
pkgs/sane-scripts/src/bin/sane-mount-servo
Executable file
18
pkgs/sane-scripts/src/bin/sane-mount-servo
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
mnt=/mnt/servo-media-wan
|
||||||
|
# if lan not mounted, then try to mount it
|
||||||
|
if ! (test -d /mnt/servo-media-lan/Music)
|
||||||
|
then
|
||||||
|
sudo mount /mnt/servo-media-lan && mnt=/mnt/servo-media-lan
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if the needed mount isn't mounted, mount it
|
||||||
|
if ! (test -d $mnt/Music)
|
||||||
|
then
|
||||||
|
sudo mount $mnt
|
||||||
|
fi
|
||||||
|
|
||||||
|
# symlink the fastest mount point into place
|
||||||
|
sudo ln -sf $mnt /mnt/servo-media
|
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
mnt=/mnt/media-uninsane
|
|
||||||
if ! (test -d /mnt/media-uninsane-lan/Music)
|
|
||||||
then
|
|
||||||
sudo mount /mnt/media-uninsane-lan && mnt=/mnt/media-uninsane-lan
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! (test -d $mnt/Music)
|
|
||||||
then
|
|
||||||
sudo mount $mnt
|
|
||||||
fi
|
|
||||||
|
|
||||||
rsync -arv --delete --progress $mnt/Music/ ~/Music/
|
|
||||||
|
|
6
pkgs/sane-scripts/src/bin/sane-sync-from-servo
Executable file
6
pkgs/sane-scripts/src/bin/sane-sync-from-servo
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
sane-mount-servo
|
||||||
|
|
||||||
|
rsync -arv --delete --progress $mnt/Music/ ~/Music/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user