The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Ixchel::Actions::systemd_auto - Generate systemd service files using the systemd_service template.

VERSION

Version 0.2.0

CLI SYNOPSIS

ixchel -a systemd_auto [-s <service>] [--np] [-w] [-s <service>] [--reload] [--enable] [--start] [--restart]

CODE SYNOPSIS

    use Data::Dumper;

    my $results=$ixchel->action(action=>'systemd_auto', opts=>{np=>1, w=>1, reload=>1, enable=>1, start=>1, });

    print Dumper($results);

DESCRIPTION

The template used is systemd_service.

The generated services will be named ixchelAuto-$service.

Should be noted that the this can return what the generated templates will contain via checking the output on non-systemd systems attempting to use -w or the like outside of systemd systems will result in it failing. Printing the results on other systems is meant primarily for testing/debugging purposes.

FLAGS

-w

Write the generated services to service files.

-s <service>

A auto service to operate on.

Otherwise operates on them all.

--reload

Run systemctl daemon-reload.

--enable

Enable the generated services.

--start

Start the generated services.

--restart

Restart the generated services.

RESULT HASH REF

    .errors :: A array of errors encountered.
    .status_text :: A string description of what was done and teh results.
    .is_systemd :: Set to 1 if the system in question is systemd.
    .started :: Set to 0 if starting anything failed.
    .restarted :: Set to 0 if restarting anything failed.
    .enabled :: Set to 0 if enabling anything failed.
    .reloaded :: Set to 0 if reloading systemd failed.
    .ok :: Set to zero if any of the above errored.