This repository was archived by the owner on Jan 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ Use `ubnt` as the password to login and `$address` is the IP address of the host
99
99
100
100
## Versions
101
101
102
+ + ** 08.02.18:** Use loop to simplify symlinks.
102
103
+ ** 08.01.18:** Update to 5.6.29.
103
104
+ ** 15.12.17:** Update to 5.6.26.
104
105
+ ** 09.12.17:** Fix continuation lines.
Original file line number Diff line number Diff line change 4
4
mkdir -p \
5
5
/config/{data,logs,run}
6
6
7
+
7
8
# create symlinks for config
8
- [[ -L /usr/lib/unifi/data && ! /usr/lib/unifi/data -ef /config/data ]] && unlink /usr/lib/unifi/data
9
- [[ -L /usr/lib/unifi/logs && ! /usr/lib/unifi/logs -ef /config/logs ]] && unlink /usr/lib/unifi/logs
10
- [[ -L /usr/lib/unifi/run && ! /usr/lib/unifi/run -ef /config/run ]] && unlink /usr/lib/unifi/run
11
- [[ ! -L /usr/lib/unifi/data ]] && ln -s /config/data /usr/lib/unifi/data
12
- [[ ! -L /usr/lib/unifi/logs ]] && ln -s /config/logs /usr/lib/unifi/logs
13
- [[ ! -L /usr/lib/unifi/run ]] && ln -s /config/run /usr/lib/unifi/run
9
+ symlinks=( \
10
+ /usr/lib/unifi/data \
11
+ /usr/lib/unifi/logs \
12
+ /usr/lib/unifi/run )
13
+
14
+ for i in "${symlinks[@]}"
15
+ do
16
+ [[ -L "$i" && ! "$i" -ef /config/"$(basename "$i")" ]] && unlink "$i"
17
+ [[ ! -L "$i" ]] && ln -s /config/"$(basename "$i")" "$i"
18
+ done
14
19
15
20
# permissions
16
21
chown -R abc:abc \
You can’t perform that action at this time.
0 commit comments