{{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 329:

Line 332:

== Nexus ==

== Nexus ==

This is for Sonatype's Nexus OSS Artifact Repository.

This is for Sonatype's Nexus OSS Artifact Repository.

−

{{AUR|nexus2}} is in the [[AUR]].

+

{{AUR|nexus}} is in the [[AUR]].

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

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

Line 493:

Line 496:

== See also ==

== See also ==

−

* [https://wiki.archlinux.org/index.php/Pacman_Tips#Backing_up_Local_database_with_Systemd Backing up Local Pacman database with Systemd]

+

* [[Pacman_Tips#Backing_up_Local_database_with_Systemd|Backing up Local Pacman database with Systemd]]

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.