-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path500-objectivefs
More file actions
executable file
·31 lines (24 loc) · 1017 Bytes
/
500-objectivefs
File metadata and controls
executable file
·31 lines (24 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Install ObjectiveFS, setup a mount point and install into fstab
source common
INIT status "Install ObjectiveFS from Deb"
INIT apt-install-url 'https://objectivefs.com/user/download/axn2xgkwt/objectivefs_6.8_amd64.deb'
INIT status "Setup ObjectiveFS"
sudo mount.objectivefs config
grep -s objectivefs /etc/fstab
if [ "$?" == 0 ]; then
INIT skip "OFS already configured in /etc/fstab"
INIT status "Unmounting OFS in fstab"
sudo umount -a -t objectivefs
else
INIT status "Create OFS filesystem"
read -p "Enter S3 mountpoint to create (only alpha + dashes): " FS
sudo mount.objectivefs create "$FS"
INIT status "Setup OFS-on-boot"
read -p "Re-enter OFS passphase to install OFS into fstab: " PASS
read -p "Enter mount path: " MOUNTPATH
echo "$PASS" | sudo tee /etc/objectivefs.env/OBJECTIVEFS_PASSPHRASE >/dev/null
echo "s3://$FS $MOUNTPATH objectivefs auto,_netdev,mt,noatime,nodiratime 0 0" | sudo tee -a /etc/fstab >/dev/null
fi
INIT status "Mounting OFS"
sudo mount -a -t objectivefs