{{Note|1=Script based on the comment on the {{AUR|adsuck}} [[AUR]] package page.}}

−

−

== BOINC Daemon ==

−

{{hc|/etc/systemd/system/boinc.service|<nowiki>

−

[Unit]

−

Description=BOINC Daemon

−

−

[Service]

−

User=boinc

−

Nice=19

−

ExecStart=/usr/bin/boinc_client --dir /var/lib/boinc --redirectio

−

−

[Install]

−

WantedBy=multi-user.target

−

</nowiki>}}

== Change name of wireless interface ==

== Change name of wireless interface ==

Line 62:

Line 28:

[Install]

[Install]

WantedBy=multi-user.target</nowiki>}}

WantedBy=multi-user.target</nowiki>}}

−

−

== Courier-IMAP ==

−

{{hc|/etc/systemd/system/authdaemond.service|<nowiki>

−

[Unit]

−

Description=Courier Authentification Daemon

−

−

[Service]

−

Type=forking

−

ExecStart=/usr/sbin/authdaemond start

−

ExecStop=/usr/sbin/authdaemon stop

−

PIDFile=/run/authdaemon/pid

−

−

[Install]

−

WantedBy=multi-user.target

−

</nowiki>}}

−

−

{{hc|/etc/systemd/system/courier-imapd.service|<nowiki>

−

[Unit]

−

Description=Courier IMAP Daemon

−

Requires=authdaemond.service

−

After=authdaemond.service

−

−

[Service]

−

Type=forking

−

EnvironmentFile=/etc/courier-imap/imapd

−

ExecStart=/usr/lib/courier-imap/imapd.rc start

−

ExecStop=/usr/lib/courier-imap/imapd.rc stop

−

PIDFile=/var/run/courier/imapd.pid

−

−

[Install]

−

WantedBy=multi-user.target

−

</nowiki>}}

−

−

{{hc|/etc/systemd/system/courier-imapd-ssl.service|<nowiki>

−

[Unit]

−

Description=Courier IMAP Daemon

−

Requires=authdaemond.service

−

After=authdaemond.service

−

−

[Service]

−

Type=forking

−

EnvironmentFile=/etc/courier-imap/imapd

−

ExecStart=/usr/lib/courier-imap/imapd-ssl.rc start

−

ExecStop=/usr/lib/courier-imap/imapd-ssl.rc stop

−

PIDFile=/var/run/courier/imapd-ssl.pid

−

−

[Install]

−

WantedBy=multi-user.target

−

</nowiki>}}

−

−

{{hc|/usr/lib/tmpfiles.d/authdaemond.conf|<nowiki>

−

D /run/authdaemon 0755 courier courier

−

</nowiki>}}

−

−

{{hc|/usr/lib/tmpfiles.d/courier-imapd.conf|<nowiki>

−

D /run/courier 0755 courier courier

−

</nowiki>}}

−

−

{{Note|Taken from Gentoo and modified for Arch. You could replace the files in tmpfiles.d with appropriate ExecStartPre calls as well. Service files for pop3d and pop3d-ssl are still missing, but are probably very similar to the imapd files!}}

−

−

{{Warning|1=Beware that you may need to add Requires=network.target to certain units like mythtv or chrony if you use this unit }}

{{Note|This way of doing it (specifically the use of tty-force) is not recommended according to [http://lists.freedesktop.org/archives/systemd-devel/2012-October/006905.html this thread], which suggests an alternative approach similar to that taken for LUKS.}}

{{Note|This way of doing it (specifically the use of tty-force) is not recommended according to [http://lists.freedesktop.org/archives/systemd-devel/2012-October/006905.html this thread], which suggests an alternative approach similar to that taken for LUKS.}}

+

+

{{Note|There are 2 issues possibly arising from this approach: one is a possible timeout when the password is not entered within 90 seconds; and the second is the side-by-side compatibility of mounting more than one device in this way. The first can be resolved by slightly modifying each of the two files: first, add the option {{ic|1=x-systemd.device-timeout=0}} to the corresponding fstab mount line; and second, add the line {{ic|1=Type=oneshot}} to the Service section of the truecrypt-service file in order to prevent timeout there. Now you can take as long as you want to enter the PW and the boot process will wait for you. For the second issue, if you have problems mounting more than one device during startup (e.g. with the two password prompts interfering) and/or want to avoid entering multiple passwords, you could consider securing the second and further devices by a keyfile located on the first encrypted device.}}

== truecrypt (mount encrypted fs) ==

== truecrypt (mount encrypted fs) ==

Line 376:

Line 278:

{{Note|1=I don't know if this works yet. It may be necessary to replace {{ic|1=TimeoutSec=5}} with {{ic|1=ExecStart=sleep 5}}. If you use {{ic|mpd}}, make sure to uncomment {{ic|1=Before=mpd.service}} to make sure this service is executed after mpd is closed down (different order during the shutdown of processes than during start up!). Script gleaned from [https://bbs.archlinux.org/viewtopic.php?pid=1163334#p1163334 tladuke on the forums].}}

{{Note|1=I don't know if this works yet. It may be necessary to replace {{ic|1=TimeoutSec=5}} with {{ic|1=ExecStart=sleep 5}}. If you use {{ic|mpd}}, make sure to uncomment {{ic|1=Before=mpd.service}} to make sure this service is executed after mpd is closed down (different order during the shutdown of processes than during start up!). Script gleaned from [https://bbs.archlinux.org/viewtopic.php?pid=1163334#p1163334 tladuke on the forums].}}

−

−

== verynice ==

−

{{hc|/etc/systemd/system/verynice.service|<nowiki>

−

[Unit]

−

Description=A tool for dynamically adjusting the nice-level of processes

−

−

[Service]

−

Type=forking

−

PIDFile=/var/run/verynice.pid

−

ExecStart=/usr/sbin/verynice -d /var/run/verynice.pid

−

ExecStop=/bin/kill -15 $MAINPID

−

−

[Install]

−

WantedBy=multi-user.target

−

</nowiki>}}

== MPD Socket Activation ==

== MPD Socket Activation ==

Line 442:

Line 329:

[Install]

[Install]

WantedBy=multi-user.target

WantedBy=multi-user.target

−

</nowiki>}}

−

−

== ZNC ==

−

Assuming znc was set up to be run by znc user from {{ic|/var/lib/znc}} as explained in the [[Znc]] wiki page.

{{Note|1=As of VirtualBox 4.2 there is another way to get virtual machines going: http://lifeofageekadmin.com/how-to-set-your-virtualbox-vm-to-automatically-startup/ Please edit the [[VirtualBox]] page if you figure it out.}}

{{Note|1=As of VirtualBox 4.2 there is another way to get virtual machines going: http://lifeofageekadmin.com/how-to-set-your-virtualbox-vm-to-automatically-startup/ Please edit the [[VirtualBox]] page if you figure it out.}}

If your encrypted volume is /dev/sda2, you would enable the service with this command:

# systemctl enable truecrypt@dev-sda2.service

Note: Although it works, this service should stil be considered experimental, there might be better solutions to use truecrypt with systemd. If you use mpd or any other programme that needs to access the encrypted filesystem, put it into the line starting with Before=. Cheers to dgbaley27 for basically writing this! Improvements welcome!

Note: This way of doing it (specifically the use of tty-force) is not recommended according to this thread, which suggests an alternative approach similar to that taken for LUKS.

Note: There are 2 issues possibly arising from this approach: one is a possible timeout when the password is not entered within 90 seconds; and the second is the side-by-side compatibility of mounting more than one device in this way. The first can be resolved by slightly modifying each of the two files: first, add the option x-systemd.device-timeout=0 to the corresponding fstab mount line; and second, add the line Type=oneshot to the Service section of the truecrypt-service file in order to prevent timeout there. Now you can take as long as you want to enter the PW and the boot process will wait for you. For the second issue, if you have problems mounting more than one device during startup (e.g. with the two password prompts interfering) and/or want to avoid entering multiple passwords, you could consider securing the second and further devices by a keyfile located on the first encrypted device.

Note: Gleaned from bpont on the forums. If you use mpd and have your music dir in ~, uncomment Before=mpd.service, which takes care that mpd is started after this script. If you also use truecrypt-unmount.service (see next service) uncomment the Requires=truecrypt-unmount.service and Also=truecrypt-unmount.service so it gets installed and activated by systemd automatically when using this script.

Note: I don't know if this works yet. It may be necessary to replace TimeoutSec=5 with ExecStart=sleep 5. If you use mpd, make sure to uncomment Before=mpd.service to make sure this service is executed after mpd is closed down (different order during the shutdown of processes than during start up!). Script gleaned from tladuke on the forums.

MPD Socket Activation

If the following mpd.socket file is enabled while mpd.service (provided by mpd) is disabled, systemd will not start mpd immediately, but it will listen on the appropriate sockets. When an mpd client attempts to connect on one of those sockets, systemd will start mpd.service and transparently hand over control of those ports to the mpd process.

If you prefer to listen on different UNIX sockets or network ports (even multiple sockets of each type), or if you prefer not to listen on network ports at all, you should add/edit/remove the appropriate "ListenStream=" lines in the [Socket] section of mpd.socket AND modify the appropriate lines /etc/mpd.conf (see "man 5 mpd.conf" for more details).

If you use different (even multiple) network or local sockets, or prefer not to use network sockets at all, simply add, change, or remove lines beginning with "ListenStream=" in the [Socket] section.