[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: systemd: some more questions



On Thu, 2014-02-13 at 20:00 +1100, Scott Ferguson wrote:
> Make the script S12whatever and then install systemd(?)

You need to make a _unit_ to start the S12whatever script, no need for
the "S12" you can call it "whatever", but you need to edit a unit. FWIW
all jokes about systemd units using CamelCase are already written.

[rocketmouse@archlinux ~]$ man systemd.unit
SYSTEMD.UNIT(5)                                  systemd.unit                                  SYSTEMD.UNIT(5)

NAME
       systemd.unit - Unit configuration

SYNOPSIS
       service.service, socket.socket, device.device, mount.mount, automount.automount, swap.swap,
       target.target, path.path, timer.timer, snapshot.snapshot, slice.slice, scope.scope

       /etc/systemd/system/*
       /run/systemd/system/*
       /usr/lib/systemd/system/*
       ...

       $HOME/.config/systemd/user/*
       /etc/systemd/user/*
       /run/systemd/user/*
       /usr/lib/systemd/user/*
       ...

DESCRIPTION
       A unit configuration file encodes information about a service, a socket, a device, a mount point, an
       automount point, a swap file or partition, a start-up target, a watched file system path, a timer
       controlled and supervised by systemd(1), a temporary system state snapshot, a resource management slice
       or a group of externally created processes. The syntax is inspired by XDG Desktop Entry
       Specification[1].desktop files, which are in turn inspired by Microsoft Windows .ini files.

       This man page lists the common configuration options of all the unit types. These options need to be
       configured in the [Unit] or [Install] sections of the unit files.

       In addition to the generic [Unit] and [Install] sections described here, each unit may have a
       type-specific section, e.g. [Service] for a service unit. See the respective man pages for more
       information: systemd.service(5), systemd.socket(5), systemd.device(5), systemd.mount(5),
       systemd.automount(5), systemd.swap(5), systemd.target(5), systemd.path(5), systemd.timer(5),
       systemd.snapshot(5).  systemd.slice(5).  systemd.scope(5).

[snip]
[rocketmouse@archlinux ~]$ cat /etc/systemd/system/multi-user.target.wants/alice.service
[Unit]
Description=Alice PPPoE

[Service]
Type=oneshot
ExecStart=/etc/rc.d/alice start
ExecStop=/etc/rc.d/alice stop
RemainAfterExit=true

[Install]
WantedBy=multi-user.target

[rocketmouse@archlinux ~]$ cat /etc/systemd/system/multi-user.target.wants/rtirq.service 
[Unit] 
Description=Realtime IRQ thread system tuning 

[Service] 
Type=oneshot 
ExecStart=/etc/rc.d/rtirq start
ExecStop=/etc/rc.d/rtirq stop 
RemainAfterExit=true 

[Install] 
WantedBy=multi-user.target


Reply to: