-
-
Save tracphil/05701659f63348b5b6207635b912705d to your computer and use it in GitHub Desktop.
Creating new systemd service unit
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
# vi /etc/systemd/system/proxyclient.service | |
[Unit] | |
Description=Proxy Client | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/sbin/proxy_client -s metro.basoro.id -p 4900 -k key | |
TimeoutStartSec=0 | |
[Install] | |
WantedBy=default.target | |
# systemctl daemon-reload | |
# systemctl enable proxyclient.service | |
# systemctl start proxyclient.service | |
# systemctl reboot |
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
# vi /etc/systemd/system/rc-local.service | |
[Unit] | |
Description=/etc/rc.local Compatibility | |
ConditionPathExists=/etc/rc.local | |
[Service] | |
Type=forking | |
ExecStart=/etc/rc.local start | |
TimeoutSec=0 | |
StandardOutput=tty | |
RemainAfterExit=yes | |
SysVStartPriority=99 | |
[Install] | |
WantedBy=multi-user.target | |
# printf '%s\n' '#!/bin/bash' 'exit 0' | tee -a /etc/rc.local | |
# chmod +x /etc/rc.local | |
# systemctl enable rc-local | |
# systemctl start rc-local.service | |
# systemctl status rc-local.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment