Last active
December 19, 2017 06:33
-
-
Save atl/d4836630918e80e9dd3953c9d2dc3bbb to your computer and use it in GitHub Desktop.
ubooquity rc.d
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 | |
# PROVIDE: ubooquity | |
# REQUIRE: NETWORKING | |
# BEFORE: DAEMON | |
# KEYWORD: shutdown | |
# | |
# Add the following lines to /etc/rc.conf to enable this service: | |
# | |
# ubooquity_enable (bool): Set it to YES to enable mdnsd(8) on startup. | |
# Default: NO | |
. /etc/rc.subr | |
name=ubooquity | |
desc="Book and Comic service" | |
rcvar=ubooquity_enable | |
: ${ubooquity_enable:=NO} | |
: ${ubooquity_libraryport:=80} | |
ubooquity_chdir=/ubooquity | |
java_cmd=/usr/local/openjdk8-jre/bin/java | |
java_flags="-Xmx1024m" | |
java_jar="Ubooquity.jar" | |
ubooquity_flags="${java_flags} -jar ${java_jar} --headless --remoteadmin --libraryport ${ubooquity_libraryport}" | |
command_args="</dev/null &>/dev/null" | |
command="${java_cmd}" | |
load_rc_config $name | |
run_rc_command "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment