Skip to content

Instantly share code, notes, and snippets.

@basoro
Created February 27, 2020 00:49
Show Gist options
  • Save basoro/23531a6ee99d2066ea68c5909fb48907 to your computer and use it in GitHub Desktop.
Save basoro/23531a6ee99d2066ea68c5909fb48907 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
@basoro
Copy link
Author

basoro commented Mar 18, 2020

Ubuntu

sudo nano /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

@basoro
Copy link
Author

basoro commented Jan 4, 2021

Windows

Go to Run (WINDOWS + R) and Type shell:startup, paste your .bat file there !

tunnel.bat

START C:\proxy_client.exe -s metro.basoro.id -p 4900 -k key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment