- tags: Linux
Systemd
Links to this note
systemd by example
tags: Linux, Systemd source: “Systemd by Example - Part 1: Minimization - Sebastian Jambor’s Blog.” Accessed February 18, 2024. https://seb.jambor.dev/posts/systemd-by-example-part-1-minimization/. systemd unit types There are 11 different unit types, the most common 3 of them: targets: activated by different system state, it’s useful as a dependency, e.g. sleep.target:do something when system is going to sleep. Of course, we can use systemctl to list the units that dependant on a specific unit....
Use Podman to Run Systemd in a Container
tags: Linux,Systemd source: Walsh, Daniel. “How to Run Systemd in a Container.” Red Hat Developer, April 24, 2019. https://developers.redhat.com/blog/2019/04/24/how-to-run-systemd-in-a-container. Podmand is a container engine which is published by Red Hat, has the same command-line interface(CLI) as Docker.
Logrotate Don't Work With Supervisor on Ubuntu 20.04 With Systemd
tags: Linux,Systemd,Supervisor,Logrotate Background I usually use supervisor1 to deploy my services, and capture the stdout/stderr to the log files, and then use logrotate to rotate the logs, which the configuration likes: /data/log/app/*/*.log { daily missingok rotate 180 dateext compress delaycompress notifempty create 640 nobody adm sharedscripts postrotate /usr/local/bin/supervisorctl -c /etc/supervisord.conf pid && kill -USR2 `/usr/local/bin/supervisorctl -c /etc/supervisord.conf pid` > /tmp/kill.log 2>&1 endscript } As you can see, I make the logrotate to send a signal to supervisord after the logs have been rotated, to let the supervisord reopen the logs....