Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ build/
*.key
*.dat
trojan-go

# Visual studio code workspace files
.vscode
23 changes: 23 additions & 0 deletions example/trojango
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

# PROVIDE: trojango
# REQUIRE: LOGIN cleanvar
# KEYWORD: shutdown

# This is a FreeBSD rc.d script file for managing the trojan-go service
#
# The trojan-go is located at /usr/local/tjgo/trojan-go
# Log file and err file is under /var/log/

. /etc/rc.subr

name=trojango
rcvar=trojango_enable

command="/usr/local/tjgo/trojan-go"
trojango_flags="-config /usr/local/tjgo/server.yaml"

command_args="> /var/log/trojango.log 2> /var/log/trojango.err &"

load_rc_config $name
run_rc_command "$1"