aboutsummaryrefslogtreecommitdiffstats
path: root/setup-docker.sh
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-03-28 13:26:20 -0400
committerEugene Triguba <hello@eugenetriguba.com>2026-03-28 13:33:00 -0400
commit3bb961484cc6a8403d70794ab53beee7613e5ec7 (patch)
treed28a541f0dcedff3691fc83e8c6ff771f8314de5 /setup-docker.sh
parentFix rendered formatting of numbered list on git.sr.ht (diff)
downloadplex-setup-3bb961484cc6a8403d70794ab53beee7613e5ec7.zip
Use env file and break out setup-plex into two scripts
Diffstat (limited to '')
-rwxr-xr-xsetup-docker.sh (renamed from setup-plex.sh)28
1 files changed, 11 insertions, 17 deletions
diff --git a/setup-plex.sh b/setup-docker.sh
index ee282b1..b421872 100755
--- a/setup-plex.sh
+++ b/setup-docker.sh
@@ -2,29 +2,23 @@
set -e
main() {
- ensure_fstab_entry
+ parse_args "$@"
install_docker_gpg_key
add_docker_repository
install_docker
}
-ensure_fstab_entry() {
- _fstab_uuid="2c882f17-50e7-4099-a305-693f4aa0113b"
- _fstab_mount_point="/mnt/media"
- _fstab_fs_type="xfs"
- _fstab_options="defaults"
- _fstab_dump="0"
- _fstab_pass="2"
- _fstab_entry="UUID=${_fstab_uuid} ${_fstab_mount_point} ${_fstab_fs_type} ${_fstab_options} ${_fstab_dump} ${_fstab_pass}"
+parse_args() {
+ case "${1:-}" in
+ -h | --help) usage ;;
+ esac
+}
- if ! grep -q "UUID=${_fstab_uuid}" /etc/fstab; then
- echo "Adding mount entry to /etc/fstab..."
- echo "${_fstab_entry}" | sudo tee -a /etc/fstab >/dev/null
- echo "Creating mount point if it doesn't exist..."
- sudo mkdir -p "${_fstab_mount_point}"
- else
- echo "Mount entry already exists in /etc/fstab"
- fi
+usage() {
+ echo "Usage: sudo ./setup-docker.sh [-h]"
+ echo ""
+ echo "Installs Docker on Ubuntu."
+ exit 0
}
install_docker_gpg_key() {