Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
sol1-backupninja
sol1-backupninja
Commits
72f37159
Commit
72f37159
authored
Jul 09, 2018
by
Paul Formosa
Browse files
Add nfsmount handler
parent
f25b0d22
Changes
5
Hide whitespace changes
Inline
Side-by-side
debian/control
View file @
72f37159
...
...
@@ -27,6 +27,7 @@ Depends:
rdiff-backup,
sshfs,
unzip,
nfs-common,
nsca
Suggests:
bzip2,
...
...
@@ -38,6 +39,7 @@ Suggests:
rdiff-backup,
rsync,
subversion,
nfs-common,
trickle,
wodim
Description: lightweight, extensible meta-backup system
...
...
debian/sol1-backupninja.examples
View file @
72f37159
...
...
@@ -10,3 +10,5 @@ examples/example.svn
examples/example.sys
examples/example.trac
examples/backupninja.conf
examples/example.smbmount
examples/example.nfsmount
examples/example.nfsmount
0 → 100644
View file @
72f37159
## name of the share you want to mount
nfsmountpath = /volume1/backups
## name or IP address of the server that shares the directory
host = <hostname or ipaddress>
## where to mount it
mountpoint = /mnt/foldername
examples/example.smbmount
0 → 100644
View file @
72f37159
## name of the share you want to mount
share = sharedfolder
## name or IP address of the server that shares the directory
host = <hostname or ipaddress>
## name of the user to connect as
## (defaults to "guest")
user = username
## password for this user if required (otherwise don't specify)
pass = password
## where to mount it
mountpoint = /mnt/mountpointfolder
\ No newline at end of file
handlers/nfsmount.in
0 → 100644
View file @
72f37159
#!/bin/sh
# Mount a remote NFS share ('nfsmountpath') from a NFS server ('host')
# onto a destination directory ('mountpoint').
### ATTENTION
# This handler assumes that nfs-common packages are installed on the system
getconf nfsmountpath
getconf host
getconf mountpoint
if
[
!
-d
"
$mountpoint
"
]
;
then
halt
"Destination directory does not exist"
fi
if
grep
$mountpoint
/proc/mounts
;
then
umount
-f
$mountpoint
fi
mount
$host
:
$nfsmountpath
$mountpoint
||
halt
"Mount failed"
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment