Skip to content

Instantly share code, notes, and snippets.

@tracphil
Forked from basoro/proxyclient.service
Last active July 29, 2020 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tracphil/05701659f63348b5b6207635b912705d to your computer and use it in GitHub Desktop.
Save tracphil/05701659f63348b5b6207635b912705d to your computer and use it in GitHub Desktop.
Creating new systemd service unit
# 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
# 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