Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linux-tgz release file #206

Merged
merged 1 commit into from
Apr 21, 2021
Merged

Add linux-tgz release file #206

merged 1 commit into from
Apr 21, 2021

Conversation

mac-zhou
Copy link

add a linx tgz(tar.gz) release file that can use by Ansible Unarchive
ansible-playbook like:

  - name: Download & Unarchive go-shadowsocks2
    unarchive:
      remote_src: yes
      src: https://github.com/shadowsocks/go-shadowsocks2/releases/download/{{ version }}/shadowsocks2-linux.tgz
      dest: /usr/bin

  - name: Copy & Add go-shadowsocks2 systemd  service
    copy:
      src: go-shadowsocks2.service
      dest: /lib/systemd/system/go-shadowsocks2.service

  - name: Start & Enable go-shadowsocks2 service
    systemd:
      name: go-shadowsocks2
      state: started
      enabled: yes
      daemon_reload: yes

file go-shadowsocks2.service like:

[Unit]
Description=Shadowsocks2
Wants=network-online.target
After=network-online.target

[Service]
User=nobody
PermissionsStartOnly=true
ExecStart=/usr/bin/shadowsocks2-linux -s 'ss://AEAD_CHACHA20_POLY1305:1234@:5678'
Nice=-10
KillMode=process
Restart=on-failure
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target%

@riobard riobard merged commit acdbac0 into shadowsocks:master Apr 21, 2021
xiahaijiao pushed a commit to xiahaijiao/go-shadowsocks2 that referenced this pull request Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants