Skip to content
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

programs_services doesn't seem to work #8

Open
thiagowfx opened this issue Jan 23, 2022 · 2 comments · May be fixed by #16
Open

programs_services doesn't seem to work #8

thiagowfx opened this issue Jan 23, 2022 · 2 comments · May be fixed by #16

Comments

@thiagowfx
Copy link

Disclaimer: I reproduced this only once.

Environment

% doas cat /etc/apk/autoupdate.conf
# Configuration for apk-autoupdate.

# List of packages that should not be automatically upgraded.
# Note: Case patterns (shell "case") may be used.
#packages_blacklist="linux-*"

# List of services that may be automatically restarted.
# Note: Case patterns (shell "case") may be used.
#services_whitelist=""

# List of services that should not be automatically restarted.
# Note: Case patterns (shell "case") may be used.
#services_blacklist="*"

# List of colon separated mappings between program path, the corresponding
# service and optionally action (e.g. restart, reload) to be performed.
# Example: /usr/sbin/nginx:nginx:reload.
# Note: Case patterns (shell "case") may be used in program path.
#programs_services=""
programs_services="/usr/bin/miniflux:miniflux:restart"

# List of fnmatch patterns specifying files to include/exclude from checking
# when scanning processes that use some files that have been upgraded.
#check_mapped_files_filter="!/dev/* !/home/* !/run/* !/tmp/* !/var/* *"

# Options to pass into OpenRC runscripts when restarting service.
#rc_service_opts='--ifstarted --quiet --nocolor --nodeps'
% doas crontab -l
# do daily/weekly/monthly maintenance
# min   hour    day     month   weekday command
*/15    *       *       *       *       run-parts /etc/periodic/15min
0       *       *       *       *       run-parts /etc/periodic/hourly
0       2       *       *       *       run-parts /etc/periodic/daily
0       3       *       *       6       run-parts /etc/periodic/weekly
0       5       1       *       *       run-parts /etc/periodic/monthly
0       0       *       *       *       apk-autoupdate

Expected

When miniflux updated from 2.0.34 to 2.0.35, it should have had automatically restarted the service.

Observed

Service wasn't restarted automatically. miniflux -version outputted 2.0.35, but my web instance was still running 2.0.34. A manual doas /etc/init.d/miniflux restart was necessary.

Happy to provide more logs if needed for troubleshooting, just let me know which ones.

@thiagowfx
Copy link
Author

Actually, I wonder, do I need to explicitly set services_whitelist?

services_whitelist="miniflux"

If yes, then we could possibly improve the [docs](https://github.com/jirutka/apk-autoupdate/blob/7ec9519818a122fabc2f629a796f6ec7a35a17b1/man/autoupdate.conf.5.adoc#examples, as it contains an empty whitelist, suggesting it's not needed. If not, then the issue must be something else.

@fossdd
Copy link
Contributor

fossdd commented Aug 15, 2024

I believe the issue here is that services_blacklist="*" is the unchanged default, so that services are not automatically restart without user's permission.

To update it in your case, you can either set services_whitelist to miniflux or *, or set services_blacklist=''.

I believe this is a miscommunication in the docs, I can look to update that.

fossdd added a commit to fossdd/apk-autoupdate that referenced this issue Aug 15, 2024
fossdd added a commit to fossdd/apk-autoupdate that referenced this issue Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants