microsocks icon indicating copy to clipboard operation
microsocks copied to clipboard

add systemd service file

Open evert-mouw opened this issue 1 year ago • 3 comments

e.g. this works for me on Debian

microsocks.service

[Unit]
Description=microsocks is a tiny SOCKS5 server
Documentation=https://github.com/rofl0r/microsocks
After=network.target auditd.service

[Service]
EnvironmentFile=/etc/microsocks.conf
ExecStart=/usr/bin/microsocks -u ${MICROSOCKS_LOGIN} -P ${MICROSOCKS_PASSW}

[Install]
WantedBy=multi-user.target

/etc/microsocks.conf

# used by the systemd service file
MICROSOCKS_LOGIN="foo"
MICROSOCKS_PASSW="bar"

It's a bit simple, and could be expanded by improving security (chroot, user=nobody, logging, whatever) but it just works.

evert-mouw avatar Dec 10 '23 14:12 evert-mouw

that's cool but provision of service scripts has and will always be the responsibility of linux distros, not the software package itself. means i won't be adding this to the repo. i'll leave this open though so users can immediately see and copy/paste your script.

rofl0r avatar Dec 15 '23 10:12 rofl0r

Could go in a "docs/examples" directory?

On Fri, 15 Dec 2023, 10:06 rofl0r, @.***> wrote:

that's cool but provision of service scripts has and will always be the responsibility of linux distros, not the software package itself. means i won't be adding this to the repo. i'll leave this open though so users can immediately see and copy/paste your script.

— Reply to this email directly, view it on GitHub https://github.com/rofl0r/microsocks/issues/69#issuecomment-1857603520, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4TJUXAFINOA55OZOWH46DYJQOLLAVCNFSM6AAAAABAOT5V42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJXGYYDGNJSGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

srd424 avatar Dec 15 '23 10:12 srd424

TBH I'm not a huge fan of SystemD (although it has its uses) so I like software staying init neutral. But adding it to e.g. docs/examples as @srd424 suggested maybe makes more sense than leaving issues open? PS: Thanks for creating microsocks, it Just Works :-)

evert-mouw avatar Dec 16 '23 10:12 evert-mouw