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.
- 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.
- We must assume that apart from Plinth there will be user or user-agent
changes to the configuration files. In this case the value may be set
something other than '1' day.
- Remove emacs mode line as emacs automatically detect Python files
based on the #! line.
- End comments with a '.'.
- Use single quotes instead of double quotes for string for consistensy.
- Update message to say that it take more than a minute to finish
upgrades. Some times it takes a lot more than that.
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.
- If during an action, user does not exist ignore.
- If during an action, return a non-zero exist status.
- Catch an errors during actions as exceptions.
- Display a message that corresponding POSIX operation failed.