mirror of
https://git.freebsd.org/ports.git
synced 2025-05-04 23:47:37 -04:00
Rustypaste is a minimal file upload/pastebin service. Features: * File upload & URL shortening & upload from URL - supports basic HTTP authentication - random file names (optional) - pet name (e.g. capital-mosquito.txt) - alphanumeric string (e.g. yB84D2Dv.txt) - supports expiring links - auto-deletion of expired files (optional) - supports one shot links (can only be viewed once) - guesses MIME types - supports overriding and blacklisting - no duplicate uploads (optional) * Single binary * Simple configuration - supports hot reloading * No database - filesystem is used * Self-hosted - centralization is bad! * Written in Rust - blazingly fast! WWW: https://github.com/orhun/rustypaste/ PR: 267095
35 lines
1.2 KiB
Bash
Executable file
35 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# PROVIDE: rustypaste
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Configuration settings for rustypaste in /etc/rc.conf
|
|
#
|
|
# rustypaste_enable (bool): Enable rustypaste. (Default=NO)
|
|
# rustypaste_env_file (str): Path containing the environment variables
|
|
# to be used by rustypaste. (Default: %%ETCDIR%%/rustypaste.env)
|
|
# rustypaste_logfile (str): Log file used to store the rustypaste's output. (Default: /var/log/rustypaste.log)
|
|
# rustypaste_pidfile (str): File used by rustypaste to store the process ID. (Default: /var/run/rustypaste.pid)
|
|
# rustypaste_username (str): User to run rustypaste as. (Default: rustypaste)
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="rustypaste"
|
|
desc="Minimal file upload/pastebin service"
|
|
rcvar="rustypaste_enable"
|
|
|
|
load_rc_config $name
|
|
|
|
: ${rustypaste_enable:="NO"}
|
|
: ${rustypaste_env_file:="%%ETCDIR%%/rustypaste.env"}
|
|
: ${rustypaste_logfile:="/var/log/rustypaste.log"}
|
|
: ${rustypaste_pidfile:="/var/run/rustypaste.pid"}
|
|
: ${rustypaste_username:="%%USER%%"}
|
|
|
|
pidfile="${rustypaste_pidfile}"
|
|
procname="%%PREFIX%%/bin/rustypaste"
|
|
command="/usr/sbin/daemon"
|
|
command_args="-o '${rustypaste_logfile}' -p '${pidfile}' -u '${rustypaste_username}' -t '${desc}' -- ${procname}"
|
|
|
|
run_rc_command "$1"
|