-
Notifications
You must be signed in to change notification settings - Fork 168
Improving app management: script for moving apps to an alternative location #4276
Conversation
added a script for moving apps in a apps2 directory to keep owncloud installation clean.
Great, thanks @tboerger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me
I have a lot of improvements, I will do a commit which is easier... |
@tboerger The physical content of the /apps and /apps-external folder and the listing of the occ command for (non)shipped apps does not match These are the apps how they are currently identified as of 10.0.8
For the record, my present but disabled app are:
No pattern match to the table above. Before this PR gets merged, more work needs to be done @PVince81 this might interest you too... |
lib/private/App/AppManager.php#L401
core/shipped.json
This leads to the point that some apps are delivered by the tar file but not marked as shipped... Anyway - not a good situation 👎 |
Should this rather be an occ command ? |
👍 I LIKE IT 👍
occ maintenance:mode --on |
@@ -71,17 +71,60 @@ The configuration example below shows how to add a second directory, called ``ap | |||
:emphasize-lines: 9-13 | |||
|
|||
After you add a new directory configuration, you can then move apps from the original app directory to the new one. | |||
To do so, follow these steps: | |||
If you want to identify as an example all non core / non shipped apps, use the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest the following to aid in clarity of intent:
If you want to identify, as an example, all non-core or non-shipped apps, use the following command:
|
||
:: | ||
|
||
sudo -uwww-data ./occ app:list --shipped=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standard documentation convention is sudo -u www-data php occ
.
|
||
#. :ref:`Enable maintenance mode <maintenance_commands_label>`. | ||
#. :ref:`Disable the apps <apps_commands_label>` that you want to move. | ||
#. Create a new apps directory and assign it the same user and group, and ownership permissions as the core apps directory. | ||
#. Create a new apps directory like ``apps-external`` and assign it the same user, group and ownership permissions as the core apps directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Create a new apps directory like apps-external
and/Create a new apps directory, like apps-external
, and/g
#. Move the apps from the old apps directory to the new apps directory. | ||
#. Add a new app directory in ``config/config.php``. | ||
#. Add the key for the new app directory in ``config/config.php``. | ||
#. If you're using a cache, such as `Redis <../configuration/server/caching_configuration.html#clearing-the-redis-cache>`_ or `Memcached <../configuration/server/caching_configuration.html#clearing-the-memcached-cache>`_, ensure that you clear the cache. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs convention is to store page links at the bottom of the page, as it makes editing easier. For example:
#. If you're using a cache, such as `Redis`_ or `Memcached`_, ensure that you clear the cache.
... rest of the document...
.. Links
.. _Redis: ../configuration/server/caching_configuration.html#clearing-the-redis-cache
.. _Memcached: ../configuration/server/caching_configuration.html#clearing-the-memcached-cache
Script for moving non core apps in custom app directories | ||
--------------------------------------------------------- | ||
|
||
In the same way as you can manually move eg non core / non shipped apps to a custom directory, a script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest the following, for increased clarity:
In the same way as you can manually move apps, e.g., non-core or non-shipped, to a custom directory, a script
#. If you're using a cache, such as `Redis <../configuration/server/caching_configuration.html#clearing-the-redis-cache>`_ or `Memcached <../configuration/server/caching_configuration.html#clearing-the-memcached-cache>`_, ensure that you clear the cache. | ||
#. Re-enable the apps. | ||
#. Disable maintenance mode. | ||
|
||
As preparation, please install the ``jq`` library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/As preparation/In preparation/g
Secondly, please link jq instead of marking it up as code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know how to link jq.
I doubt that this is my work here.
#. If you're using a cache, such as `Redis <../configuration/server/caching_configuration.html#clearing-the-redis-cache>`_ or `Memcached <../configuration/server/caching_configuration.html#clearing-the-memcached-cache>`_, ensure that you clear the cache. | ||
#. Re-enable the apps. | ||
#. Disable maintenance mode. | ||
|
||
As preparation, please install the ``jq`` library. | ||
``jq`` is like sed for JSON data - you can use it to slice, filter, map and transform structured data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/jq
is like/jq is like/g. As jq's already been introduced, there's no need to draw special attention to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few changes. Otherwise, thanks for creating the PR. Much appreciated.
#29807 documents that moving apps from the core to a non-core apps folder manually can cause issues. Given that and the discussion in owncloud-archive/documentation#4276, I decided to start writing an app:move command, to make moving apps from the core apps directory, to a custom non-core apps directory simpler and less messy. When finished, the command will be able to: - List apps that can be moved - List any non-core app directories - Check that non-core app directories exist - Move one or more apps from the core apps directory to a non-core apps directory The other reason for doing this is to better familiarise myself with ownCloud's internals — something that, for quite some time, I've felt I've been lacking, and that has been hindering me from doing my work better.
Is there any update on this? |
No, there is no update, not because of coding the script, but because there is a situation where it is currently not 100% identifyable what are admin downloaded apps and which belong to owncloud. |
This change ports owncloud-archive/documentation#4276 to the docs repository.
Closing as it's been ported to the new docs. |
This change ports owncloud-archive/documentation#4276 to the docs repository.
added a script for moving apps in a apps2 directory to keep owncloud installation clean.