owncloud: Do Apache reload instead of restart

Restarting Apache breaks existing connections.  This includes the connection
on which the Plinth's user has made the ownCloud enable/disable request.  This
leads to an almost certain 'Connection Interupted' message to the client when
changes to ownCloud are submitted.

On the other hand, 'reload' is sufficient and 'restart' is not required.  It is
also faster and recommended by 'a2enconf' and 'a2disconf' commands.
This commit is contained in:
Sunil Mohan Adapa 2015-02-11 10:48:41 +05:30
parent 9ab948012e
commit 771581a75f

View File

@ -91,7 +91,7 @@ EOF
# 'adminpass' => '$adminpwd', # 'adminpass' => '$adminpwd',
a2enconf owncloud 2>&1 | logger -t owncloud-setup a2enconf owncloud 2>&1 | logger -t owncloud-setup
service apache2 restart 2>&1 | logger -t owncloud-setup service apache2 reload 2>&1 | logger -t owncloud-setup
# Initialize application and database tables by visiting # Initialize application and database tables by visiting
# the front page. This only work if admin user and # the front page. This only work if admin user and
@ -99,10 +99,10 @@ EOF
#wget --quiet http://$(uname -n)/owncloud/index.php #wget --quiet http://$(uname -n)/owncloud/index.php
else else
a2enconf owncloud 2>&1 | logger -t owncloud-setup a2enconf owncloud 2>&1 | logger -t owncloud-setup
service apache2 restart 2>&1 | logger -t owncloud-setup service apache2 reload 2>&1 | logger -t owncloud-setup
fi fi
else else
a2disconf owncloud 2>&1 | logger -t owncloud-setup a2disconf owncloud 2>&1 | logger -t owncloud-setup
service apache2 restart 2>&1 | logger -t owncloud-setup service apache2 reload 2>&1 | logger -t owncloud-setup
fi fi
fi fi