some systemd unit and service files for (debian)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IMPORTANT: only (!) compatible with dhcpcd5, not dhcpcd3 | |
[Unit] | |
Description=dhcpcd on %I | |
Wants=network.target | |
Before=network.target | |
[Service] | |
Type=forking | |
PIDFile=/run/dhcpcd-%I.pid | |
ExecStart=/sbin/dhcpcd -A -q -w %I | |
ExecStop=/sbin/dhcpcd -k %I | |
[Install] | |
Alias=multi-user.target.wants/dhcpcd@eth0.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=dhcpcd on %I | |
Wants=network.target | |
Before=network.target | |
[Service] | |
Type=forking | |
PIDFile=/run/dhcpcd-%I.pid | |
ExecStart=/sbin/dhcpcd -A -q -w %I | |
ExecStop=/sbin/dhcpcd -k %I | |
[Install] | |
Alias=multi-user.target.wants/dhcpcd@eth0.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Daemon which acts upon network cable insertion/removal | |
[Service] | |
Type=forking | |
PIDFile=/run/ifplugd.%i.pid | |
ExecStart=/usr/sbin/ifplugd %i | |
SuccessExitStatus=0 1 2 | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Daemon which acts upon network cable insertion/removal | |
[Service] | |
Type=forking | |
PIDFile=/run/ifplugd.%i.pid | |
ExecStart=/usr/sbin/ifplugd %i | |
SuccessExitStatus=0 1 2 | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is systemd template for monit service. To | |
# register # monit with systemd, place the monit.servicefile | |
# to the /lib/systemd/system/ directory and then start it | |
# using systemctl (see bellow). | |
# | |
# Enable monit to start on boot: | |
# systemctl enable monit.service | |
# | |
# Start monit immediately: | |
# systemctl start monit.service | |
# | |
# Stop monit: | |
# systemctl stop monit.service | |
# | |
# Status: | |
# systemctl status monit.service | |
[Unit] | |
Description=Pro-active monitoring utility for unix systems | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/monit -I | |
ExecStop=/usr/bin/monit quit | |
ExecReload=/usr/bin/monit reload | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Network Time Service | |
After=network.target nss-lookup.target | |
[Service] | |
Type=forking | |
PrivateTmp=true | |
ExecStart=/usr/sbin/ntpd -g -u ntp:ntp | |
ControlGroup=cpu:/ | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=SSH Per-Connection Server | |
Requires=sshdgenkeys.service | |
After=syslog.target | |
After=sshdgenkeys.service | |
[Service] | |
ExecStartPre=/bin/mkdir -m700 -p /var/run/sshd | |
ExecStart=-/usr/sbin/sshd -i | |
ExecReload=/bin/kill -HUP $MAINPID | |
StandardInput=socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Conflicts=ssh.service | |
[Socket] | |
ListenStream=22 | |
Accept=yes | |
[Install] | |
WantedBy=sockets.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=SSH Per-Connection Server | |
Requires=sshdgenkeys.service | |
After=syslog.target | |
After=sshdgenkeys.service | |
[Service] | |
ExecStartPre=/bin/mkdir -m700 -p /var/run/sshd | |
ExecStart=-/usr/sbin/sshd -i | |
ExecReload=/bin/kill -HUP $MAINPID | |
StandardInput=socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=SSH Key Generation | |
ConditionPathExists=|!/etc/ssh/ssh_host_key | |
ConditionPathExists=|!/etc/ssh/ssh_host_key.pub | |
ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key | |
ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key.pub | |
ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key | |
ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key.pub | |
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key | |
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key.pub | |
[Service] | |
ExecStart=/usr/bin/ssh-keygen -A | |
Type=oneshot | |
RemainAfterExit=yes | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment