https://wiki.archlinux.org/api.php?action=feedcontributions&user=Prasinoulhs&feedformat=atomArchWiki - User contributions [en]2024-03-29T11:42:15ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Systemd/Services&diff=215333Systemd/Services2012-07-28T18:45:15Z<p>Prasinoulhs: /* mysqld */ No need for extra script, add group.</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Daemons and system services]]<br />
[[Category:Boot process]]<br />
{{Article summary start}}<br />
{{Article summary text|This page will be useful to publish [[systemd]] service files that are missing in the {{pkg|systemd-arch-units}} package. These files can be copied from other distributions or created by yourself.}}<br />
<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Systemd}}<br />
{{Article summary end}}<br />
<br />
Currently, systemd is mostly at feature parity with Arch's initscripts. However, a lot more testing is needed. If you would like to help out, you can fork the [https://github.com/falconindy/initscripts-systemd initscripts-systemd] or [http://github.com/falconindy/systemd-arch-units systemd-arch-units] git repos and submit pull requests for your additions. This wiki page can serve as a staging area for these files.<br />
<br />
== mysqld ==<br />
<br />
{{hc|/etc/systemd/system/mysqld.service|<nowiki><br />
[Unit]<br />
Description=MySQL Server<br />
After=syslog.target<br />
After=network.target<br />
<br />
[Service]<br />
User=mysql<br />
Group=mysql<br />
ExecStart=/usr/bin/mysqld --user=mysql<br />
ExecStop=/bin/kill -15 $MAINPID<br />
Restart=always<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki>}}<br />
<br />
{{hc|/etc/tmpfiles.d/mysqld.conf|<nowiki>d /var/run/mysqld 0755 mysql mysql -</nowiki>}}<br />
<br />
== irexecd ==<br />
{{hc|/etc/systemd/system/irexecd.service|<nowiki><br />
<br />
[Unit]<br />
Description=LIRC irexec Daemon<br />
Requires=lircd.service<br />
After=lircd.service<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=/etc/conf.d/irexec.conf<br />
ExecStart=/usr/bin/irexec --daemon $IREXEC_OPTS<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
References:<br />
* http://lists.freedesktop.org/archives/systemd-devel/2011-January/001182.html<br />
<br />
== lircd ==<br />
{{hc|/etc/systemd/system/lircd.service|<nowiki><br />
<br />
[Unit]<br />
Description=LIRC Daemon<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=/etc/conf.d/lircd.conf<br />
PIDFile=/run/lirc/lircd.pid<br />
ExecStartPre=/bin/mkdir -p /run/lirc<br />
ExecStartPre=/bin/rm -f /dev/lircd<br />
ExecStartPre=/bin/rm -f /run/lirc/lircd<br />
ExecStartPre=/bin/ln -s /run/lirc/lircd /dev/lircd<br />
<br />
ExecStart=/usr/sbin/lircd -d $LIRC_DEVICE -P /run/lirc/lircd.pid -H $LIRC_DRIVER $LIRC_CONFIGFILE<br />
ExecStopPost=/bin/rm -f /dev/lircd<br />
ExecStopPost=/bin/rm -fR /run/lirc<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Note|{{ic|$LIRC_EXTRAOPTS}} set in {{ic|/etc/conf.d/lircd.conf}} will not work, as {{ic|lircd}} will print an error about the argument count. Any extra options should be hardcoded into the unit file.}}<br />
<br />
References:<br />
* http://lists.freedesktop.org/archives/systemd-devel/2011-January/001182.html<br />
* https://bbs.archlinux.org/viewtopic.php?id=141300<br />
<br />
== rc.local ==<br />
<br />
{{hc|/etc/systemd/system/rc-local.service|<nowiki><br />
[Unit]<br />
Description=/etc/rc.local Compatibility<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/etc/rc.local<br />
TimeoutSec=0<br />
StandardInput=tty<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{Note|Also available through the unrecommended {{Pkg|initscripts-systemd}} (see: [[Systemd#Arch_integration]]).}}<br />
<br />
== apache2 ==<br />
<br />
{{hc|/etc/systemd/system/httpd.service|<nowiki><br />
[Unit]<br />
Description=Apache Webserver<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=/etc/conf.d/apache<br />
ExecStart=/usr/sbin/httpd -k start $OPTIONS<br />
ExecStop=/usr/sbin/httpd -k graceful-stop $OPTIONS<br />
ExecReload=/usr/sbin/httpd -k graceful $OPTIONS<br />
Restart=always<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
{{hc|/etc/tmpfiles.d/httpd.conf|<nowiki><br />
D /var/run/httpd 0755 http http -<br />
</nowiki>}}<br />
<br />
== postfix ==<br />
<br />
{{hc|/etc/systemd/system/postfix.service|<nowiki><br />
[Unit]<br />
Description=Mail Daemon<br />
After=network.target<br />
<br />
[Service]<br />
Type=forking<br />
ExecStart=/usr/sbin/postfix start<br />
ExecStop=/usr/sbin/postfix stop<br />
ExecReload=/usr/sbin/postfix reload<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== memcached ==<br />
<br />
{{hc|/etc/systemd/system/memcached.service|<nowiki><br />
[Unit]<br />
Description=memcached daemon<br />
After=network.target<br />
<br />
[Service]<br />
EnvironmentFile=/etc/conf.d/memcached<br />
PIDFile=/var/run/memcached.pid<br />
ExecStart=/usr/bin/memcached -d -P /var/run/memcached.pid -u $MEMCACHED_USER $MEMCACHED_ARGS<br />
ExecStop=/bin/kill -15 $MAINPID<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Static ethernet network ==<br />
This is a custom service file for static ethernet configurations. For other configurations, see [[Systemd#Network]]<br />
{{hc|/etc/conf.d/network|<nowiki><br />
interface=eth0<br />
address=192.168.0.1 <br />
netmask=24 <br />
broadcast=192.168.0.255 <br />
gateway=192.168.0.254</nowiki>}}<br />
<br />
{{hc|/etc/systemd/system/network.service|<nowiki><br />
[Unit] <br />
Description=Network Connectivity <br />
Wants=network.target <br />
Before=network.target<br />
<br />
[Service] <br />
Type=oneshot <br />
RemainAfterExit=yes <br />
EnvironmentFile=/etc/conf.d/network <br />
ExecStart=/sbin/ip link set dev ${interface} up<br />
ExecStart=/sbin/ip addr add ${address}/${netmask} broadcast ${broadcast} dev ${interface}<br />
ExecStart=/sbin/ip route add default via ${gateway}<br />
ExecStop=/sbin/ip addr flush dev ${interface} <br />
ExecStop=/sbin/ip link set dev ${interface} down<br />
<br />
[Install] <br />
WantedBy=multi-user.target</nowiki>}}<br />
<br />
== Remote filesystem mounts ==<br />
<br />
''See: [[Systemd#Remote_filesystem_mounts]]''<br />
<br />
== distccd ==<br />
<br />
{{hc|/etc/systemd/system/distccd.service|<nowiki><br />
[Unit]<br />
Description=distcc<br />
<br />
[Service]<br />
Type=forking<br />
EnvironmentFile=/etc/conf.d/distccd<br />
ExecStart=/usr/bin/distccd --daemon $DISTCC_ARGS<br />
ExecStop=/bin/kill -15 $MAINPID<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== Verynice ==<br />
<br />
{{hc|/etc/systemd/system/verynice.service|<nowiki><br />
[Unit]<br />
Description=A tool for dynamically adjusting the nice-level of processes<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/var/run/verynice.pid<br />
ExecStart=/usr/sbin/verynice -d /var/run/verynice.pid<br />
ExecStop=/bin/kill -15 $MAINPID<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== cpufreq ==<br />
<br />
{{hc|/etc/systemd/system/cpufreq.service|<nowiki><br />
[Unit]<br />
Description=CPU frequency scaling daemon<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
EnvironmentFile=/etc/conf.d/cpufreq<br />
ExecStart=/usr/bin/cpufreq-set -r -g $governor -d $min_freq -u $max_freq<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
This sets the governor of all cores to the one specified in<br />
{{ic|/etc/conf.d/cpufreq}}.<br />
<br />
If you use the {{ic|freq}} option, use to the following instead:<br />
{{hc|/etc/systemd/system/cpufreq.service|<nowiki><br />
[Unit]<br />
Description=CPU frequency scaling daemon<br />
<br />
[Service]<br />
Type=oneshot<br />
RemainAfterExit=yes<br />
EnvironmentFile=/etc/conf.d/cpufreq<br />
ExecStart=/usr/bin/cpufreq-set -r -f $freq<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== apcupsd ==<br />
<br />
{{hc|/etc/systemd/system/apcupsd.service|<nowiki><br />
[Unit]<br />
Description=APC UPS Monitor<br />
<br />
[Service]<br />
ExecStart=/sbin/apcupsd -b<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== healthd ==<br />
<br />
{{hc|/etc/systemd/system/healthd.service|<nowiki><br />
[Unit]<br />
Description=Sensors Health Daemon<br />
Requires=lm_sensors.service<br />
<br />
[Service]<br />
Type=forking<br />
ExecStart=/usr/sbin/healthd<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== transmission daemon ==<br />
<br />
Set {{ic|1=User=}} to the user the daemon should run as.<br />
<br />
{{hc|/etc/systemd/system/transmissiond.service|<br />
2=[Unit]<br />
Description=transmission daemon<br />
<br />
[Service]<br />
User=''transmission''<br />
ExecStart=/usr/bin/transmission-daemon -f<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
}}<br />
<br />
== BOINC Daemon ==<br />
<br />
{{hc|/etc/systemd/system/boinc.service|<nowiki><br />
[Unit]<br />
Description=BOINC Daemon<br />
<br />
[Service]<br />
User=boinc<br />
Nice=19<br />
ExecStart=/usr/bin/boinc_client --dir /var/lib/boinc --redirectio<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== auditd ==<br />
<br />
{{hc|/etc/systemd/system/auditd.service|<nowiki><br />
<br />
[Unit]<br />
Description=Audit Daemon<br />
<br />
[Service]<br />
ExecStartPre=/sbin/auditctl -R /etc/audit/audit.rules<br />
ExecStart=/sbin/auditd -n<br />
ExecStop=/bin/kill -15 $MAINPID<br />
ExecReload=/bin/kill -HUP $MAINPID<br />
Restart=always<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
== See also ==<br />
<br />
[[systemd]]</div>Prasinoulhshttps://wiki.archlinux.org/index.php?title=GParted&diff=212348GParted2012-07-08T23:09:07Z<p>Prasinoulhs: /* Filesystems */ Added btrfs entry, reorganized entries alphabetically</p>
<hr />
<div>[[Category:File systems]]<br />
[[Category:System recovery]]<br />
== Introduction ==<br />
=== GParted Overview ===<br />
[http://gparted.sourceforge.net/index.php GParted] is a GTK+ frontend to GNU Parted and the official GNOME Partition Editor application. Use it to make/delete/resize/check partitions of nearly any file format. You can also manage drive labels and flags as well as copy/paste entire partitions. GParted is available in the extra repo and also as a [http://gparted.sourceforge.net/download.php Live CD] if you'd prefer. One reason to actually download the Live CD would be that you need to make modifications to your root filesystem's partition which you cannot do without unmounting it.<br />
<br />
{{Warning|Since GParted can read/write to your drive partitions misuse can result in data loss. It is recommended that you back-up affected partitions prior to using GParted.}}<br />
=== Supported Filesystems ===<br />
For a complete list of filesystems GParted can handle, see the [http://gparted.sourceforge.net/features.php features table] over at GParted's homepage.<br />
<br />
== Installation on Arch ==<br />
GParted is in the extra repo as mentioned above, to install it simply use [[Pacman]] as you would with any other Arch package:<br />
# pacman -S gparted<br />
<br />
== Optional Dependencies ==<br />
=== Filesystems ===<br />
The base GParted package doesn't come with support for all filesystems. Here is a brief list of additional packages you can install to add support for different filesystems:<br />
<br />
{| border="1"<br />
| '''Arch Package''' || '''Filesystem'''<br />
|-<br />
| btrfs-progs || btrfs<br />
|-<br />
| dosfstools || fat16/32<br />
|-<br />
| e2fsprogs || ext2/ext3/ext4 (v1.41+)<br />
|- <br />
| jfsutils || jfs<br />
|-<br />
| ntfsprogs || ntfs<br />
|-<br />
| reiser4progs || reiserfs<br />
|-<br />
| reiserfsprogs || reiserfs<br />
|-<br />
| xfsprogs || xfs<br />
|}<br />
<br />
=== Additional functionality ===<br />
{| border="1"<br />
| '''Arch Package''' || '''Functionality'''<br />
|-<br />
| mtools || Utilities for MSDOS disks. Needed if you want to change the label of FAT-volumes.<br />
|}<br />
<br />
Note that when you install GParted via pacman, it will list these for you also.<br />
<br />
== GParted Support ==<br />
Have a look at the [http://gparted-forum.surf4.info/ Official GParted Forums] prior to executing a command if you are unsure about what you're doing.<br />
== Tips ==<br />
=== Adding GParted-live to your Grub menu ===<br />
See the [[Gparted-Live]] wiki article for instructions on adding GParted-live to your Grub menu so you can boot into the same live environment as the GParted-live CD directly from Grub and without the CD!<br />
<br />
=== Dual Booting with Windows XP ===<br />
If you have a Windows XP partition that you would like to move from drive-to-drive that also happens to be your boot partition, you can do so easily with GParted and keep Windows happy simply by deleting the following registry key PRIOR to the partition move:<br />
<br />
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices<br />
<br />
Reference to this little gem: [http://gparted-forum.surf4.info/viewtopic.php?pid=8347#p8347 here].<br />
<br />
=== Fixing Messed-up Partition Order ===<br />
Your partition order can get messed up if you have logical volumes and you erase one of them. Consider the following example:<br />
<pre>/dev/sda1 (Primary partition)<br />
/dev/sda2 (Primary partition)<br />
/dev/sda3 (Primary partition)<br />
/dev/sda4 (EXTENDED partition)<br />
/dev/sda5 (Logical partition)<br />
/dev/sda6 (Logical partition)<br />
/dev/sda7 (Logical partition)</pre><br />
<br />
So 1-3 are primary partitions. 5-6 are logical partitions within the extended partition. Let's say you want to nuke /dev/sda5 and copy/paste /dev/sda2 into the resulting freespace. Now your drive looks like this:<br />
<br />
<pre>/dev/sda1 (Primary partition)<br />
/dev/sda2 (Primary partition)<br />
/dev/sda3 (Primary partition)<br />
/dev/sda4 (EXTENDED partition)<br />
/dev/sda7 (Logical partition)<br />
/dev/sda5 (Logical partition)<br />
/dev/sda6 (Logical partition)</pre><br />
<br />
Notice that the order is messed up after your delete, copy/paste operation. This can cause all sorts of problems from not being able to mount an expected partition, to grub error 17/no bootable system. The solution to this little problem is simple: <br />
*Boot with your Arch Live CD or GParted Live CD (or any other live Linux CD)<br />
*Run fdisk on the drive, enter expert mode, fix the partition order, and write the changes to disk<br />
<br />
Example using /dev/sda<br />
# fdisk /dev/sda<br />
#Once you're in fdisk, choose option '''x''' (extra functionality (experts only)) and enter.<br />
#Then select '''f''' (fix partition order) and enter.<br />
#Then select option '''w''' (write table to disk and exit), and enter.<br />
<br />
{{Note|You must run '''partprobe''' (as root) or reboot the system in order for the kernel to read the new partition table!}}<br />
<br />
=== Starting GParted from a menu ===<br />
<br />
If you are having issues loading GParted from a menu, for instance the xfce applications menu. You will have to install the {{pkg|polkit}} package and autostart it with your session.</div>Prasinoulhs