Created
August 1, 2018 10:27
-
-
Save cgt/8b6ff08da15868ec873962267103b0e5 to your computer and use it in GitHub Desktop.
rc.d/weechat
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
#!/bin/sh | |
# | |
# $FreeBSD$ | |
# | |
# PROVIDE: weechat | |
# REQUIRE: NETWORK | |
# KEYWORD: shutdown | |
. /etc/rc.subr | |
name="weechat" | |
rcvar=weechat_enable | |
start_cmd="${name}_start" | |
stop_cmd="${name}_stop" | |
load_rc_config $name | |
: ${weechat_enable:=no} | |
weechat_start() { | |
su - chat -c "tmux new-session -d -s irc weechat" | |
} | |
weechat_stop() { | |
su - chat -c "tmux kill-session -t irc" | |
} | |
run_rc_command "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment