samba.sh add read-only check to timezone
This commit is contained in:
parent
753d2e6b20
commit
25747dc441
2
samba.sh
2
samba.sh
@ -65,7 +65,7 @@ timezone() { local timezone="${1:-EST5EDT}"
|
||||
return
|
||||
}
|
||||
|
||||
if [[ $(cat /etc/timezone) != $timezone ]]; then
|
||||
if [[ -w /etc/timezone && $(cat /etc/timezone) != $timezone ]]; then
|
||||
echo "$timezone" >/etc/timezone
|
||||
ln -sf /usr/share/zoneinfo/$timezone /etc/localtime
|
||||
dpkg-reconfigure -f noninteractive tzdata >/dev/null 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user