-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move the notify-crontab to its own script #2391
Conversation
Signed-off-by: szaimen <szaimen@e.mail.de>
@szaimen Thanks! Could you please fix the failing tests, and I'll finish it off. |
done |
Thanks! Will have a look tomorrow! 🥇 |
Not tested, but looks good to me. |
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
OK, so coding wise almost done, but the issue that remains is how to fetch the correct Any idea @szaimen? |
OK, so for an idea at least:
|
Did you enable the files_external app? |
Haha yes. :D |
@szaimen Can you check the output of the above command and form a variable that will be the actual Thanks! |
You can use a local external storage mount as example. That should have the same output... |
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
OK, grepped it from DB. Can you please test if this works: https://github.com/nextcloud/vm/pull/2391/files#diff-67bceb0888b398c45857e1bc41f753da1a696075ff08b9b82f8136bc6af0139aR1124-R1134 Thanks! |
nextcloud_update.sh
Outdated
@@ -1121,6 +1121,18 @@ then | |||
print_text_in_color "$ICyan" "Nextcloud crontab updated to run every 5 minutes." | |||
fi | |||
|
|||
# Replace iNotify checker with a script instead | |||
if crontab -u www-data -l | grep -q "files_external:notify -v" |
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.
Why not get the ids from the crontab? That would be a much safer way imho...
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 crontab might not be true (not used, leftover, etc), but the DB is.
Also, will several mounts generate several crontab-rows?
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 crontab might not be true (not used, leftover, etc), but the DB is.
However the user might not have axtivated the feature for all mounts and does not want to do so.
Also, will several mounts generate several crontab-rows?
Yes. Each mount for which the feature was activated will have its own row.
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.
Hmm... It makes it a bit more complicated.
Maybe the best option here is to just ditch the replacement to the new way of doing it.
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
Close #2356
Signed-off-by: szaimen szaimen@e.mail.de