The clean & modern RSS server that doesn't give you any crap.
https://thearsse.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
543 B
26 lines
543 B
#!/usr/bin/env bash
|
|
|
|
readonly default_php="/usr/bin/php"
|
|
php=""
|
|
|
|
check_sudo() {
|
|
if ! command -v sudo > /dev/null; then
|
|
printf "The sudo command is not available.\n"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
# allow overriding the php executable
|
|
if [[ -n "${ARSSE_PHP}" ]] && command -v "${ARSSE_PHP}" > /dev/null; then
|
|
php="${ARSSE_PHP}"
|
|
else
|
|
php="${default_php}"
|
|
fi
|
|
|
|
if [[ "${UID}" -eq 0 ]]; then
|
|
runuser -u "arsse" -- "$php" /usr/share/webapps/arsse/arsse.php "$@"
|
|
else
|
|
check_sudo
|
|
sudo -u "arsse" "$php" /usr/share/webapps/arsse/arsse.php "$@"
|
|
fi
|
|
|
|
|