summarylogtreecommitdiffstats
path: root/zeronet.install
diff options
context:
space:
mode:
Diffstat (limited to 'zeronet.install')
-rw-r--r--zeronet.install10
1 files changed, 10 insertions, 0 deletions
diff --git a/zeronet.install b/zeronet.install
index 5db7e3f6dd68..1db3fea22bc5 100644
--- a/zeronet.install
+++ b/zeronet.install
@@ -8,6 +8,9 @@ post_install() {
mkdir -p /var/log/zeronet
chown zeronet:zeronet /var/log/zeronet
+ # This is not usual practice but to editting from web interface
+ chown zeronet:zeronet /etc/zeronet.conf
+
post_upgrade
# Don't run thesre operations automatically, because they are security-sensitive
@@ -49,4 +52,11 @@ post_upgrade() {
echo ">>> CookieAuthFile /var/lib/tor/control_auth_cookie"
echo ">>> Run: sudo rm -r /var/lib/tor-auth && sudo systemctl restart tor"
fi
+
+ if [ "$(version "$(echo $2 | sed s/\.r.*//)")" -lt "$(version 0.6.3)" ]
+ then
+ # In 0.6.3+, we do this on install, but for already installed versions:
+ # This is not usual practice but to editting from web interface
+ chown zeronet:zeronet /etc/zeronet.conf
+ fi
}