mirror of
https://github.com/unifi-utilities/unifios-utilities.git
synced 2024-08-30 18:32:21 +00:00
4.0 support (#608)
This commit is contained in:
@ -4,20 +4,16 @@ CONTAINER=haproxy
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
1*)
|
||||
DATA_DIR="/mnt/data"
|
||||
;;
|
||||
2*)
|
||||
DATA_DIR="/data"
|
||||
;;
|
||||
3*)
|
||||
DATA_DIR="/data"
|
||||
;;
|
||||
DATA_DIR="/mnt/data"
|
||||
;;
|
||||
2* | 3* | 4*)
|
||||
DATA_DIR="/data"
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: No persistent storage found." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
echo "ERROR: No persistent storage found." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check if the directory exists
|
||||
if [ ! -d "${DATA_DIR}/haproxy" ]; then
|
||||
# If it does not exist, create the directory
|
||||
|
@ -3,20 +3,16 @@ IMAGE=haproxy:latest
|
||||
DATA_DIR="/data"
|
||||
case "$(ubnt-device-info firmware || true)" in
|
||||
1*)
|
||||
DATA_DIR="/mnt/data"
|
||||
;;
|
||||
2*)
|
||||
DATA_DIR="/data"
|
||||
;;
|
||||
3*)
|
||||
DATA_DIR="/data"
|
||||
;;
|
||||
DATA_DIR="/mnt/data"
|
||||
;;
|
||||
2* | 3* | 4*)
|
||||
DATA_DIR="/data"
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: No persistent storage found." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
echo "ERROR: No persistent storage found." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
podman pull $IMAGE
|
||||
podman stop haproxy
|
||||
podman rm haproxy
|
||||
|
Reference in New Issue
Block a user