-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also limit Docker build to tag pushes
- Loading branch information
Showing
8 changed files
with
119 additions
and
40 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
version: 2 | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- id: sshmux | ||
binary: sshmux | ||
env: | ||
- CGO_ENABLED=0 | ||
main: . | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
flags: | ||
- -trimpath | ||
ldflags: | ||
- -s -w | ||
archives: | ||
- format: binary | ||
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}" | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
use: github-native | ||
nfpms: | ||
- id: default | ||
package_name: sshmux | ||
homepage: https://github.com/USTC-vlab/sshmux | ||
maintainer: "USTC Vlab Team <[email protected]>" | ||
description: |- | ||
A reverse proxy for SSH | ||
formats: | ||
- deb | ||
umask: 0o022 | ||
section: admin | ||
priority: extra | ||
scripts: | ||
postinstall: etc/postinst.sh | ||
preremove: etc/prerm.sh | ||
contents: | ||
- src: README.md | ||
dst: /usr/share/doc/sshmux/ | ||
- src: etc/config.example.json | ||
dst: /etc/sshmux/ | ||
- src: etc/sshmux.service | ||
dst: /lib/systemd/system/ | ||
|
||
|
||
# modelines, feel free to remove those if you don't want/use them: | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj |
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# Only run when systemd is running | ||
[ -d /run/systemd ] || exit 0 | ||
|
||
systemctl daemon-reload | ||
systemctl enable sshmux.service |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# Only run when systemd is running | ||
[ -d /run/systemd ] || exit 0 | ||
|
||
systemctl disable --now sshmux.service |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=A reverse proxy for SSH | ||
StartLimitIntervalSec=0 | ||
ConditionPathExists=/etc/sshmux/config.json | ||
|
||
[Service] | ||
Type=exec | ||
ExecStart=/usr/bin/sshmux -c /etc/sshmux/config.json | ||
WorkingDirectory=/etc/sshmux/ | ||
Restart=on-failure | ||
RestartSec=5s | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file was deleted.
Oops, something went wrong.