-
Notifications
You must be signed in to change notification settings - Fork 215
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
Add systemd service to Debian package #77
Comments
Hey, actually I'm more inclined to remove the service/daemon stuff from the debian package. Running it as a daemon is actually a fairly uncommon use-case. Usually people use vmtouch as an interactive tool, or in a cron job. The daemon only makes sense when you're doing memory locking, and there are a lot of different ways you might want to do this, it's hard to make a fully generic service definition, I think. |
@hoytech Our little distro/overlay uses now vmtouch as a replacement for a tmpfs to store scripts and settings files for fast execution/reading. The tmpfs has the large disadvantage that files need to be copied there on boot and stored back to disk on shutdown. Editing them on disk is overwritten and a system crash causes changes to be lost. So using the native fs cache is much better, as long as one does not care about fs writes, e.g. when worrying about SDcard wear, in case of plain text config files not an issue... Generally I think that it could be omitted completely, since native fs cache is already done nicely on regularly read files, but I didn't want to loose the performance boost completely for now. But indeed we use an own compiled deb package with an own service file and default config, hence having this in upstream is not necessarily required. |
Did you thing about a systemd service? Something like:
A problem is that it does not work with the same options as the sysvinit service does (default environment file):
-d
would requireType=forking
and at best a PID file then as well. But for systemd it is not required and IMO preferable to get binary output as well, to run it with defaultType=simple
and no daemon mode.VMTOUCH_USER_GROUP
variable (?), or it would require to separate it in an ugly ExecStartPre step or something.ENABLE_VMTOUCH
IMO does not make any sense at all. Instead of changing this variable, one should simply disable the service.The text was updated successfully, but these errors were encountered: