mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
This will make via webinterface editing on PDF available. For more details check the webpage: https://www.stirlingpdf.com/ Github: https://github.com/Stirling-Tools/Stirling-PDF Documentation: https://docs.stirlingpdf.com/
57 lines
1.3 KiB
Bash
57 lines
1.3 KiB
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: stirlingpdf
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
# Configuration settings for Stirling-PDF in /etc/rc.conf:
|
|
#
|
|
# stirlingpdf_enable (bool):
|
|
# Set tto "NO" by default.
|
|
# Set it to "YES" to enable Stirling-PDF
|
|
#
|
|
# stirlingpdf_home (str):
|
|
# Set to "%%STIRLINGPDF_HOME%%" by default.
|
|
#
|
|
# stirlingpdf_user (str):
|
|
# Set to "%%STIRLINGPDF_USER%%" by default.
|
|
# User to run Stirling-PDF as.
|
|
#
|
|
# stirlingpdf_group (str):
|
|
# Set to "%%STIRLINGPDF_GROUP%%" by default.
|
|
# Group for data file ownership
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="stirlingpdf"
|
|
rcvar="${name}_enable"
|
|
load_rc_config "${name}"
|
|
|
|
: ${stirlingpdf_enable:="NO"}
|
|
: ${stirlingpdf_home="%%STIRLINGPDF_HOME%%"}
|
|
: ${stirlingpdf_user="%%STIRLINGPDF_USER%%"}
|
|
: ${stirlingpdf_group="%%STIRLINGPDF_GROUP%%"}
|
|
|
|
stirlingpdf_prestart()
|
|
{
|
|
if [ ! -d "/var/run/${name}" ]; then
|
|
install -d -o "${stirlingpdf_user}" -g "${stirlingpdf_group}" -m 750 "/var/run/${name}"
|
|
fi
|
|
}
|
|
|
|
stirlingpdf_start()
|
|
{
|
|
su -m ${stirlingpdf_user} -c "cd ${stirlingpdf_home} && exec ${command} ${command_args}"
|
|
}
|
|
|
|
pidfile=/var/run/${name}/${name}.pid
|
|
command=/usr/sbin/daemon
|
|
procname="%%JAVA%%"
|
|
command_args="-f -p ${pidfile} %%JAVA%% -jar %%DISTNAME%%%%EXTRACT_SUFX%%"
|
|
required_files="%%JAVA%% ${stirlingpdf_home}/%%DISTNAME%%%%EXTRACT_SUFX%%"
|
|
|
|
start_precmd=stirlingpdf_prestart
|
|
start_cmd=stirlingpdf_start
|
|
|
|
run_rc_command "$1"
|