-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #253 from sealink/TF-695-fix-nfs-mount-config
[TF-695] Fix nfs-mount config script
- Loading branch information
Showing
4 changed files
with
30 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# QuickPrint | ||
|
||
## Unreleased | ||
|
||
* [TF-695] Fix nfs-mount config script | ||
|
||
## 1.6.1 | ||
|
||
* [TF-470] Update nfs mount config | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# Define your mount point | ||
MOUNT_POINT="/mnt/nfs" | ||
|
||
# Check if the mount point is already mounted | ||
if mountpoint -q "$MOUNT_POINT"; then | ||
echo "Mount point $MOUNT_POINT is already mounted." | ||
else | ||
echo "Mount point $MOUNT_POINT is not mounted. Mounting now..." | ||
|
||
SFTP_PASSWORD=$(sudo /opt/elasticbeanstalk/bin/get-config environment -k SFTP_PASSWORD) | ||
echo "$SFTP_PASSWORD" > /tmp/credentials | ||
sudo sshfs -o allow_other,StrictHostKeyChecking=no,password_stdin sftp-user@172.18.0.12:/ /mnt/nfs < /tmp/credentials | ||
rm /tmp/credentials | ||
|
||
echo "Mounting complete." | ||
|
||
echo "Reboot docker now..." | ||
sudo service docker restart | ||
echo "Docker has been restarted." | ||
fi |