initial commit of file from CVS for smeserver-tt-rss on Sat Sep 7 21:09:52 AEST 2024
This commit is contained in:
1
root/etc/e-smith/db/configuration/defaults/tt-rss/DbName
Normal file
1
root/etc/e-smith/db/configuration/defaults/tt-rss/DbName
Normal file
@@ -0,0 +1 @@
|
||||
rssdb
|
1
root/etc/e-smith/db/configuration/defaults/tt-rss/DbUser
Normal file
1
root/etc/e-smith/db/configuration/defaults/tt-rss/DbUser
Normal file
@@ -0,0 +1 @@
|
||||
rssuser
|
@@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/tt-rss/access
Normal file
1
root/etc/e-smith/db/configuration/defaults/tt-rss/access
Normal file
@@ -0,0 +1 @@
|
||||
private
|
1
root/etc/e-smith/db/configuration/defaults/tt-rss/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/tt-rss/status
Normal file
@@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/tt-rss/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/tt-rss/type
Normal file
@@ -0,0 +1 @@
|
||||
configuration
|
@@ -0,0 +1 @@
|
||||
tt-rss backend (systemd service)
|
1
root/etc/e-smith/db/configuration/defaults/ttrss/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/ttrss/status
Normal file
@@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/ttrss/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/ttrss/type
Normal file
@@ -0,0 +1 @@
|
||||
service
|
12
root/etc/e-smith/db/configuration/migrate/tt-rss-database
Normal file
12
root/etc/e-smith/db/configuration/migrate/tt-rss-database
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
|
||||
my $rec = $DB->get('tt-rss') || $DB->new_record('tt-rss', { type => 'webapp' });
|
||||
my $pw = $rec->prop('DbPassword');
|
||||
|
||||
if (not $pw){
|
||||
$pw = `/usr/bin/openssl rand -base64 60 | tr -c -d '[:graph:]'`;
|
||||
chomp($pw);
|
||||
$rec->set_prop('DbPassword', $pw);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
UID="root"
|
||||
GID="root"
|
||||
PERMS=0755
|
@@ -0,0 +1,3 @@
|
||||
UID="root"
|
||||
GID="apache"
|
||||
PERMS=0640
|
1
root/etc/e-smith/templates/etc/cron.d/tt-rss/All
Normal file
1
root/etc/e-smith/templates/etc/cron.d/tt-rss/All
Normal file
@@ -0,0 +1 @@
|
||||
# Cron job disabled, SME Server uses the daemon to update the feeds
|
@@ -0,0 +1,49 @@
|
||||
{
|
||||
my $db = ${'tt-rss'}{'DbName'} || 'rssdb';
|
||||
my $user = ${'tt-rss'}{'DbUser'} || 'rssuser';
|
||||
my $pass = ${'tt-rss'}{'DbPassword'} || 'secret';
|
||||
|
||||
$OUT .= <<"END";
|
||||
#! /bin/sh
|
||||
if [ \! -d /var/lib/mysql/$db ]; then
|
||||
/usr/bin/mysqladmin create $db
|
||||
/usr/bin/mysql $db < '/usr/share/tt-rss/sql/mysql/schema.sql'
|
||||
fi
|
||||
|
||||
/usr/bin/mysql <<EOF
|
||||
USE mysql;
|
||||
|
||||
REPLACE INTO user (
|
||||
host,
|
||||
user,
|
||||
password)
|
||||
VALUES (
|
||||
'localhost',
|
||||
'$user',
|
||||
PASSWORD ('$pass'));
|
||||
|
||||
|
||||
REPLACE INTO db (
|
||||
host,
|
||||
db,
|
||||
user,
|
||||
select_priv, insert_priv, update_priv, delete_priv,
|
||||
create_priv, alter_priv, index_priv, drop_priv, create_tmp_table_priv,
|
||||
grant_priv, lock_tables_priv, references_priv)
|
||||
VALUES (
|
||||
'localhost',
|
||||
'$db',
|
||||
'$user',
|
||||
'Y', 'Y', 'Y', 'Y',
|
||||
'Y', 'Y', 'Y', 'Y', 'Y',
|
||||
'N', 'Y', 'Y');
|
||||
|
||||
FLUSH PRIVILEGES;
|
||||
|
||||
EOF
|
||||
|
||||
su -s /bin/bash - www -c "cd /usr/share/tt-rss && echo 'yes' | /usr/bin/php__PHP_VERSION__ ./update.php --update-schema"
|
||||
|
||||
END
|
||||
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
|
||||
if ((${'tt-rss'}{'status'} || 'enabled') eq 'enabled'){
|
||||
|
||||
my $alias = ((${'tt-rss'}{'AliasOnPrimary'} || 'enabled') eq 'enabled' ) ? 'Alias /tt-rss /usr/share/tt-rss':'';
|
||||
my $allow = ((${'tt-rss'}{'access'} || 'private') eq 'public') ? 'all granted':"ip $localAccess $externalSSLAccess";
|
||||
my $auth = ((${'tt-rss'}{'Authentication'} || 'http') eq 'http') ? "AuthName \"Tiny Tiny RSS\"\n" .
|
||||
" AuthType Basic\n" .
|
||||
" AuthBasicProvider external\n" .
|
||||
" AuthExternal pwauth\n" : '';
|
||||
my $php =<<'_EOF';
|
||||
AddType application/x-httpd-php .php
|
||||
<FilesMatch \.php$>
|
||||
SetHandler "proxy:unix:/var/run/php-fpm/php74-tt-rss.sock|fcgi://localhost"
|
||||
</FilesMatch>
|
||||
_EOF
|
||||
|
||||
$OUT .=<<"_EOF";
|
||||
|
||||
$alias
|
||||
|
||||
<Directory /usr/share/tt-rss>
|
||||
$php
|
||||
SSLRequireSSL on
|
||||
_EOF
|
||||
|
||||
if ( $auth ) {
|
||||
$OUT .= " $auth\n" .
|
||||
" <RequireAll>\n" .
|
||||
" Require $allow\n" .
|
||||
" Require valid-user\n" .
|
||||
" </RequireAll>\n";
|
||||
} else {
|
||||
$OUT .= "Require $allow\n";
|
||||
}
|
||||
|
||||
$OUT .=<<_EOF;
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/tt-rss/schema>
|
||||
Require all denied
|
||||
</Directory>
|
||||
|
||||
_EOF
|
||||
}
|
||||
else{
|
||||
$OUT .= " # TT-RSS is disabled\n";
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
{
|
||||
my $sslport = $modSSL{'TCPPort'} || '443';
|
||||
my $status = ${'tt-rss'}{'status'} || 'enabled';
|
||||
my $alias = ${'tt-rss'}{'AliasOnPrimary'} || 'enabled';
|
||||
|
||||
if (($port ne $sslport) && ($status eq 'enabled') && ($alias eq 'enabled')){
|
||||
|
||||
## Redirect Web Address to Secure Address
|
||||
$OUT .= " RewriteEngine on\n";
|
||||
$OUT .= " RewriteRule ^/tt-rss(/.*|\$) https://%{HTTP_HOST}/tt-rss\$1 \[L,R\]\n";
|
||||
|
||||
}
|
||||
}
|
||||
|
55
root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20tt-rss
Normal file
55
root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20tt-rss
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
if ($PHP_VERSION eq '74'){
|
||||
if ((${'tt-rss'}{status} || 'disabled') eq 'enabled'){
|
||||
my $id = 'tt-rss';
|
||||
my $openbasedir = '/usr/share/tt-rss:/var/cache/tt-rss/:/var/run/php-fpm/:/var/lib/php/tt-rss/' .
|
||||
':/var/lock/tt-rss/:/usr/share/php/:/usr/share/pear/:/opt/remi/php74/root/usr/share/pear/' .
|
||||
':/opt/remi/php74/root/usr/share/php/';
|
||||
$disablefunctions = 'system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, ' .
|
||||
'escapeshellarg, escapeshellcmd';
|
||||
|
||||
$OUT .=<<_EOF;
|
||||
|
||||
[php$PHP_VERSION-$id]
|
||||
user = www
|
||||
group = www
|
||||
listen.owner = root
|
||||
listen.group = www
|
||||
listen.mode = 0660
|
||||
listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock
|
||||
pm = dynamic
|
||||
pm.max_children = 15
|
||||
pm.start_servers = 3
|
||||
pm.min_spare_servers = 3
|
||||
pm.max_spare_servers = 4
|
||||
pm.max_requests = 1000
|
||||
request_terminate_timeout = 30
|
||||
php_admin_value[session.save_path] = /var/lib/php/$id/session
|
||||
php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache
|
||||
php_admin_value[upload_tmp_dir] = /var/lib/php/$id/tmp
|
||||
php_admin_value[error_log] = /var/log/php/$id/error.log
|
||||
slowlog = /var/log/php/$id/slow.log
|
||||
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName }
|
||||
php_admin_flag[display_errors] = off
|
||||
php_admin_flag[log_errors] = on
|
||||
php_admin_value[error_log] = syslog
|
||||
php_admin_value[memory_limit] = 128M
|
||||
php_admin_value[max_execution_time] = 30
|
||||
php_admin_value[post_max_size] = 2M
|
||||
php_admin_value[upload_max_filesize] = 1M
|
||||
php_admin_value[max_input_time] = 60
|
||||
php_admin_value[disable_functions] = $disablefunctions;
|
||||
php_admin_value[open_basedir] = $openbasedir;
|
||||
php_admin_flag[allow_url_fopen] = on
|
||||
php_admin_flag[file_upload] = off
|
||||
php_admin_flag[session.cookie_httponly] = on
|
||||
php_admin_flag[allow_url_include] = off
|
||||
php_admin_value[session.save_handler] = files
|
||||
|
||||
_EOF
|
||||
}
|
||||
else{
|
||||
$OUT .= '; Tiny Tiny RSS is disabled';
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
{
|
||||
|
||||
my $db = ${'tt-rss'}{'DbName'} || 'rssdb';
|
||||
my $user = ${'tt-rss'}{'DbUser'} || 'rssuser';
|
||||
my $pass = ${'tt-rss'}{'DbPassword'} || 'secret';
|
||||
my $port = $mysqld{'TCPPort'} || '3306';
|
||||
|
||||
$OUT .=<<"HERE";
|
||||
|
||||
putenv('TTRSS_DB_TYPE=mysql');
|
||||
putenv('TTRSS_DB_HOST=localhost');
|
||||
putenv('TTRSS_DB_PORT=$port');
|
||||
putenv('TTRSS_DB_USER=$user');
|
||||
putenv('TTRSS_DB_NAME=$db');
|
||||
putenv('TTRSS_DB_PASS=$pass');
|
||||
putenv('TTRSS_DB_HOST=localhost');
|
||||
|
||||
HERE
|
||||
}
|
||||
|
||||
putenv('TTRSS_MYSQL_CHARSET=UTF8');
|
||||
// Connection charset for MySQL.
|
||||
|
@@ -0,0 +1,26 @@
|
||||
|
||||
putenv('TTRSS_SELF_URL_PATH={ ${'tt-rss'}{'Uri'} || 'https://' . $SystemName . '.' . $DomainName . '/tt-rss' }');
|
||||
// Full URL of your tt-rss installation. This should be set to the
|
||||
// location of tt-rss directory, e.g. http://yourserver/tt-rss/
|
||||
// You need to set this option correctly otherwise several features
|
||||
// including PUSH, bookmarklets and browser integration will not work properly.
|
||||
|
||||
putenv('TTRSS_CACHE_DIR=/var/cache/tt-rss');
|
||||
// Local cache directory for RSS feed content.
|
||||
|
||||
putenv('TTRSS_ICONS_DIR=rssicons');
|
||||
putenv('TTRSS_ICONS_URL=rssicons');
|
||||
// Local and URL path to the directory, where feed favicons are stored.
|
||||
// Unless you really know what you're doing, please keep those relative
|
||||
// to tt-rss main directory.
|
||||
|
||||
putenv('TTRSS_TMP_DIRECTORY=/var/lib/php/tt-rss/tmp');
|
||||
// Directory for temporary files
|
||||
|
||||
putenv('TTRSS_PHP_EXECUTABLE=/usr/bin/php74');
|
||||
// Path to PHP executable
|
||||
|
||||
putenv('TTRSS_LOCK_DIRECTORY=/var/lock/tt-rss');
|
||||
// Directory for lockfiles, must be writable to the user you run
|
||||
// daemon process or cronjobs under
|
||||
|
@@ -0,0 +1,52 @@
|
||||
{
|
||||
|
||||
my $auth = ${'tt-rss'}{'Authentication'} || 'http';
|
||||
my $plugins = ($auth eq 'internal') ? 'auth_internal':'auth_remote';
|
||||
$plugin .= ',note';
|
||||
my $multi = ((${'tt-rss'}{'MultiUser'} || 'enabled') eq 'enabled') ? 'false':'true';
|
||||
|
||||
$OUT .=<<"HERE";
|
||||
|
||||
putenv('TTRSS_SINGLE_USER_MODE=$multi');
|
||||
// Operate in single user mode, disables all functionality related to
|
||||
// multiple users.
|
||||
|
||||
putenv('TTRSS_PLUGINS=$plugins');
|
||||
// Comma-separated list of plugins to load automatically for all users.
|
||||
// System plugins have to be specified here. Please enable at least one
|
||||
// authentication plugin here (auth_*).
|
||||
// Users may enable other user plugins from Preferences/Plugins but may not
|
||||
// disable plugins specified in this list.
|
||||
HERE
|
||||
}
|
||||
|
||||
putenv('TTRSS_AUTH_AUTO_CREATE=true');
|
||||
// If users are authenticated by your web server, set this to true if
|
||||
// You want new users to be automaticaly created in tt-rss database
|
||||
// on first login
|
||||
|
||||
putenv('TTRSS_AUTH_AUTO_LOGIN=true');
|
||||
// Set this to true if you use ALLOW_REMOTE_USER_AUTH and you want
|
||||
// to skip the login form. If set to true, users won't be able to select
|
||||
// profile
|
||||
|
||||
putenv('TTRSS_DATABASE_BACKED_SESSIONS=false');
|
||||
// Store session information in a database, recommended for multiuser
|
||||
// configurations. Doesn't seem to work for everyone, so enable with caution.
|
||||
// tt-rss uses default PHP session storing mechanism if disabled.
|
||||
|
||||
putenv('TTRSS_SESSION_COOKIE_LIFETIME=0');
|
||||
// Default lifetime of a session (e.g. login) cookie. In seconds,
|
||||
// 0 means cookie will be deleted when browser closes.
|
||||
|
||||
putenv('TTRSS_SESSION_EXPIRE_TIME=86400');
|
||||
// Hard expiration limit for sessions. Should be
|
||||
// greater or equal to SESSION_COOKIE_LIFETIME
|
||||
|
||||
putenv('TTRSS_FEED_CRYPT_KEY=');
|
||||
// Key used for encryption of passwords for password-protected feeds
|
||||
// in the database. A string of 24 random characters. If left blank, encryption
|
||||
// is not used. Requires mcrypt functions.
|
||||
// Warning: changing this key will make your stored feed passwords impossible
|
||||
// to decrypt.
|
||||
|
@@ -0,0 +1,35 @@
|
||||
|
||||
putenv('TTRSS_ENABLE_UPDATE_DAEMON=true');
|
||||
// This enables different mechanism for user-triggered updates designed
|
||||
// for update daemon running in background on the server.
|
||||
// This option suggests FEEDS_FRAME_REFRESH set to a small value
|
||||
// (like 60 seconds, depending on number of users and server/bandwidth load).
|
||||
|
||||
putenv('TTRSS_DAEMON_SLEEP_INTERVAL=60');
|
||||
// Interval between update daemon update runs
|
||||
|
||||
putenv('TTRSS_DAEMON_UPDATE_LOGIN_LIMIT=0');
|
||||
// Stop updating feeds of user who haven't logged in specified
|
||||
// amount of days. 0 disables.
|
||||
|
||||
putenv('TTRSS_DAEMON_FEED_LIMIT=60');
|
||||
// Limits the amount of feeds daemon (or a cronjob) updates on one run
|
||||
|
||||
putenv('TTRSS_FORCE_ARTICLE_PURGE=0');
|
||||
// When this option is not 0, users ability to control feed purging
|
||||
// intervals is disabled and all articles (which are not starred)
|
||||
// older than this amount of days are purged.
|
||||
|
||||
putenv('TTRSS_COUNTERS_MAX_AGE=365');
|
||||
// Hard limit for unread counters calculation. Try tweaking this
|
||||
// parameter to speed up tt-rss when having a huge number of articles
|
||||
// in the database (better yet, enable purging!)
|
||||
|
||||
putenv('TTRSS_SIMPLE_UPDATE_MODE=false');
|
||||
// Enables fallback update mode where tt-rss tries to update feeds in
|
||||
// background while tt-rss is open in your browser.
|
||||
// If you don't have a lot of feeds and don't want to or can't run
|
||||
// background processes while not running tt-rss, this method is generally
|
||||
// viable to keep your feeds up to date.
|
||||
// Still, there are more robust (and recommended) updating methods
|
||||
// available, you can read about them here: http://tt-rss.org/wiki/UpdatingFeeds
|
@@ -0,0 +1,23 @@
|
||||
|
||||
// *********************************
|
||||
// *** Email and digest settings ***
|
||||
// *********************************
|
||||
|
||||
putenv('TTRSS_SMTP_FROM_NAME=Tiny Tiny RSS');
|
||||
putenv('TTRSS_SMTP_FROM_ADDRESS=noreply@{$DomainName}');
|
||||
// Name, address and subject for sending outgoing mail. This applies
|
||||
// to password reset notifications, digest emails and any other mail.
|
||||
|
||||
putenv('TTRSS_DIGEST_SUBJECT=[tt-rss] New headlines for last 24 hours');
|
||||
// Subject line for email digests
|
||||
|
||||
putenv('TTRSS_SMTP_SERVER=');
|
||||
// Hostname:port combination to send outgoing mail (i.e. localhost:25).
|
||||
// Blank - use system MTA.
|
||||
|
||||
putenv('TTRSS_SMTP_LOGIN=');
|
||||
putenv('TTRSS_SMTP_PASSWORD=');
|
||||
putenv('TTRSS_SMTP_SECURE=');
|
||||
// These three options enable SMTP authentication when sending
|
||||
// outgoing mail. Only used with SMTP_HOST
|
||||
|
@@ -0,0 +1,14 @@
|
||||
|
||||
putenv('TTRSS_ENABLE_REGISTRATION=false');
|
||||
// Allow users to register themselves. Please be vary that allowing
|
||||
// random people to access your tt-rss installation is a security risk
|
||||
// and potentially might lead to data loss or server exploit. Disabled
|
||||
// by default.
|
||||
|
||||
putenv('TTRSS_REG_NOTIFY_ADDRESS=admin@{$DomainName}');
|
||||
// Email address to send new user notifications to.
|
||||
|
||||
putenv('TTRSS_REG_MAX_USERS=0');
|
||||
// Maximum amount of users which will be allowed to register on this
|
||||
// system. 0 - no limit.
|
||||
|
@@ -0,0 +1,10 @@
|
||||
|
||||
putenv('TTRSS_SPHINX_ENABLED=false');
|
||||
// Enable fulltext search using Sphinx (http://www.sphinxsearch.com)
|
||||
// Please see http://tt-rss.org/wiki/SphinxSearch for more information.
|
||||
|
||||
putenv('TTRSS_SPHINX_INDEX=ttrss');
|
||||
// Index name in Sphinx configuration
|
||||
|
||||
putenv('TTRSS_SPHINX_SERVER=localhost:9312');
|
||||
// Hostname:port combination for the Sphinx server.
|
@@ -0,0 +1,9 @@
|
||||
|
||||
putenv('TTRSS_ENABLE_TWEET_BUTTON=false');
|
||||
// Enable 'tweet this' button for articles
|
||||
|
||||
putenv('TTRSS_CONSUMER_KEY=');
|
||||
putenv('TTRSS_CONSUMER_SECRET=');
|
||||
// Your OAuth instance authentication information for Twitter, visit
|
||||
// http://twitter.com/oauth_clients to register your instance.
|
||||
|
@@ -0,0 +1,32 @@
|
||||
putenv('TTRSS_CHECK_FOR_UPDATES=false');
|
||||
// Check for updates automatically if running Git version
|
||||
|
||||
putenv('TTRSS_ENABLE_GZIP_OUTPUT=true');
|
||||
// Selectively gzip output to improve wire performance. This requires
|
||||
// PHP Zlib extension on the server.
|
||||
|
||||
putenv('TTRSS_FEEDBACK_URL=');
|
||||
// Displays an URL for users to provide feedback or comments regarding
|
||||
// this instance of tt-rss. Can lead to a forum, contact email, etc.
|
||||
|
||||
putenv('TTRSS_ARTICLE_BUTTON_PLUGINS=note,tweet,share,mail');
|
||||
// Comma-separated list of additional article action button plugins
|
||||
// to enable, like tweet button, etc.
|
||||
// The following plugins are available: note, tweet, share, mail
|
||||
// More plugins: http://tt-rss.org/wiki/Plugins
|
||||
|
||||
// *** PubSubHubbub settings ***
|
||||
|
||||
putenv('TTRSS_PUBSUBHUBBUB_HUB=');
|
||||
// URL to a PubSubHubbub-compatible hub server. If defined, "Published
|
||||
// articles" generated feed would automatically become PUSH-enabled.
|
||||
|
||||
putenv('TTRSS_PUBSUBHUBBUB_ENABLED=false');
|
||||
// Enable client PubSubHubbub support in tt-rss. When disabled, tt-rss
|
||||
// won't try to subscribe to PUSH feed updates.
|
||||
|
||||
putenv('TTRSS_LOG_DESTINATION=');
|
||||
// Log destination to use. Possible values: sql (uses internal logging
|
||||
// you can read in Preferences -> System), syslog - logs to system log.
|
||||
// Setting this to blank uses PHP logging (usually to http server
|
||||
// error.log).
|
@@ -0,0 +1,6 @@
|
||||
putenv('TTRSS_CONFIG_VERSION=26');
|
||||
// Expected config version. Please update this option in config.php
|
||||
// if necessary (after migrating all new options from this file).
|
||||
|
||||
// vim:ft=php
|
||||
|
Reference in New Issue
Block a user