You are not logged in.

#1 2017-09-13 18:37:39

Bubbel
Member
Registered: 2015-04-16
Posts: 7

Nextcloud upgrade hook

Anyone who has Nextcloud running, installed through pacman, has ran into the following issue:
Update Nextcloud, or a Nextcloud app and the Nextcloud installation itself needs to be updated. This can be done via the browser, but that is not that neat, I think.
The other way is to do the following:

sudo -u http /usr/bin/php /usr/share/webapps/nextcloud/occ upgrade

This, to me, is much better. Even more, since we can automate it, after Nextcloud, or a Nextcloud-app is updated or installed.
This is where alpm-hooks come into play.

Create a file, called:

/etc/pacman.d/hooks/nextcloud.hook

And write the following in it:

# Update Nextcloud when core or -apps are touched

[Trigger]
Operation = Install
Operation = Upgrade
Operation = Remove
Type = Package
Target = nextcloud
Target = nextcloud-app-*

[Action]
Description = Updating Nextcloud installation
When = PostTransaction
Exec = 'sudo -u http /usr/bin/php /usr/share/webapps/nextcloud/occ upgrade'

Maybe something to add to the Nextcloud package?

Offline

#2 2017-09-13 19:19:21

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: Nextcloud upgrade hook

Bubbel wrote:

Maybe something to add to the Nextcloud package?

Open a flyspray if you haven't yet done so.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2017-09-13 19:45:52

Bubbel
Member
Registered: 2015-04-16
Posts: 7

Re: Nextcloud upgrade hook

Euhh, what's a flyspray?

Update: Ahh, a bug report. Found it!
Well, I was reading the guid for issuing bugs, and I thought it is not a bug, so it does not belong there.

I'll file a report there.

Last edited by Bubbel (2017-09-13 19:53:01)

Offline

#4 2017-09-13 19:57:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: Nextcloud upgrade hook

Select feature request from the pull down to have a maintainer review your idea.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2017-09-13 20:32:17

Bubbel
Member
Registered: 2015-04-16
Posts: 7

Re: Nextcloud upgrade hook

Done. Thanks for the info.

Offline

Board footer

Powered by FluxBB