Created
February 27, 2020 00:49
-
-
Save basoro/23531a6ee99d2066ea68c5909fb48907 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 |
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
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