Low commit activity in last 3 years
A long-lived project that still receives updates
Foreman export scripts for user-level systemd
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0

Runtime

>= 0.90.0
 Project Readme

Foreman export scripts for user-level systemd

# Gemfile
gem "foreman-export-systemd_user"

then

bundle exec foreman export systemd-user --app <app-name>

After export, this runs the following to configure systemd:

systemctl --user daemon-reload
loginctl enable-linger
systemctl --user enable <app-name>.target

To start or restart your services after export:

systemctl --user restart <app-name>.target

Including extra systemd files

Use --include-dir to copy additional systemd files (drop-in overrides, extra units, timers) after generating the main units:

bundle exec foreman export systemd-user --app <app-name> --include-dir Procfile.systemd

Example directory structure:

Procfile.systemd/
  <app-name>-web@.service.d/
    override.conf           # Drop-in override for the web service
  <app-name>-restart.service  # Extra standalone unit
  <app-name>-restart.timer    # Timer (will be enabled and started automatically)

Any .timer files in the root of the include directory will be enabled with --now.