> loginctl enable-linger [username]
> sudo loginctl enable-linger [username]
> vi .config/systemd/user/xxx_puma_production.service
> systemctl --user enable xxx_puma_production.service
> systemctl --user daemon-reload
~/.config/systemd/user/xxx_puma_production.service
[Unit]
Description=Puma HTTP Server for xxx (production)
After=network.target
[Service]
Type=notify
WatchdogSec=10
WorkingDirectory=/var/work/xxx/current
Environment=RAILS_ENV=production
Environment=RBENV_ROOT=/home/xxx/.rbenv
Environment=RBENV_VERSION=3.2.2
ExecStart=/bin/bash -lc 'cd /var/work/xxx/current && /usr/bin/env /home/xxx/.rbenv/shims/bundle exec puma -C /var/work/xxx/current/config/puma/production.rb'
ExecReload=/bin/kill -TSTP $MAINPID
Restart=always
# RestartSec=1
SyslogIdentifier=puma
[Install]
WantedBy=default.target