12 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
2dd303e9ac owncloud: Make setup more robust to repeatition
Create postgresql user and set password in two steps instead of one.  This
ensures that if a user already exists for some reason (setup already run), then
re-running will simply set a new password and generates a new configuration.
Otherwise, the user creation setup having failed because of existing user will
also fail to set new password and the generated configuration is not usable.
2015-03-08 13:23:36 +05:30
Sunil Mohan Adapa
d8ba09eb74 owncloud: Minor cleanup in action file 2015-03-08 13:23:36 +05:30
Sunil Mohan Adapa
57094d9820 owncloud: Check for database configuration to treat as enabled
- Newer version of owncloud package enable the Apache2 owncloud configuration
  by default.  This happens eventhough database configuraiton is not available.
  Plinth only checks for Apache2 owncloud configuration as enabled to determine
  if owncloud is enabled and hence falsely shows the owncloud is enabled.

- Newer version of owncloud also create a /etc/owncloud/config.php with simple
  instance identifier set.  So merely checking if the files exists is not of
  much use.

- This patch checks if the dbtype variable is configured in config.php or
  autoconfig.php along with Apache2 owncloud configuration to determine if
  owncloud is enabled.

- The same logic is used to determine if autoconfig.php must be generated.
2015-03-08 13:22:35 +05:30
Sunil Mohan Adapa
771581a75f 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.
2015-02-11 10:48:41 +05:30
Sunil Mohan Adapa
9b9d112927 Use package framework for installing ownCloud 2015-01-05 00:13:19 +05:30
Sunil Mohan Adapa
5b969d9d30 Explicitly write license headers for each source file
The package license (AGPL3+) implicitly indicates the license of each
file.  However, it is desirable to have license headers in each file.
This is the case for many prominent projects like GNU project, Mozilla
etc.
2014-11-30 14:49:49 +05:30
Petter Reinholdtsen
d71d94f2d7 Add code to enable owncloud by default using PostgreSQL. Only need to specify the admin username and password to get going. 2014-04-05 21:39:05 +02:00
James Valleroy
1b6208d0b8 Install owncloud without recommends. 2014-03-21 07:35:39 -04:00
James Valleroy
41d57cc5fc Put quotes around variables in action scripts. 2013-10-05 18:16:55 -04:00
Petter Reinholdtsen
7b9f6e09d3 Make sure apt do not ask questions when installing owncloud. 2013-09-26 13:26:21 +02:00
Petter Reinholdtsen
829e40198d Get owncloud enabling limping along. 2013-09-26 11:34:04 +02:00
Petter Reinholdtsen
fe33c348b4 First draft to add owncloud support. 2013-09-23 15:18:53 +02:00