setup: Move app data files into respective apps

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2019-03-17 16:20:57 -04:00
1 parent fdcbd46513
commit ff247fa5aa
51 files changed

No files matched your search

@@ -1,44 +0,0 @@
#!/bin/bash
#
# This file is part of FreedomBox.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
set -e # Exit with code on error
IFACE="$1"
ACTION="$2"
if [[ "$CONNECTION_ID" != *"BATMAN"* ]]; then
exit 0
fi
case ${ACTION} in
up)
logger "Setting up B.A.T.M.A.N. Advanced on interface $IFACE"
ip link set mtu 1560 dev ${IFACE}
modprobe batman-adv
echo "bat0" > /sys/class/net/${IFACE}/batman_adv/mesh_iface
ip link set up dev bat0
;;
down)
logger "Clearing B.A.T.M.A.N. Advanced on interface $IFACE"
ip link set down dev bat0
echo "none" > /sys/class/net/${IFACE}/batman_adv/mesh_iface
ip link set mtu 1500 dev ${IFACE}
;;
*)
;;
esac
@@ -1,16 +0,0 @@
##
## On all sites, provide cockpit on the path: /_cockpit/
##
## Requires the following Apache modules to be enabled:
## mod_headers
## mod_proxy
## mod_proxy_http
## mod_proxy_wstunnel
##
<Location /_cockpit/>
ProxyPass http://localhost:9090/_cockpit/
</Location>
<Location /_cockpit/cockpit/socket>
ProxyPass ws://localhost:9090/_cockpit/socket
</Location>
@@ -1,5 +0,0 @@
<Location /coquelicot>
ProxyPass http://127.0.0.1:51161/coquelicot
SetEnv proxy-sendchunks 1
RequestHeader set X-Forwarded-SSL "on"
</Location>
@@ -1,6 +0,0 @@
##
## On all sites, provide Deluge on a default path: /deluge
##
<Location /deluge>
ProxyPass http://localhost:8112
</Location>
@@ -1,15 +0,0 @@
Alias /ikiwiki /var/www/ikiwiki
Alias /ikiwiki-auth /var/www/ikiwiki
AddHandler cgi-script .cgi
<Location /ikiwiki>
Options +ExecCGI
</Location>
<Location /ikiwiki-auth>
Options +ExecCGI
Include includes/freedombox-auth-ldap.conf
Require ldap-group cn=admin,ou=groups,dc=thisbox
Require ldap-group cn=wiki,ou=groups,dc=thisbox
</Location>
@@ -1,6 +0,0 @@
# Proxy for BOSH server
ProxyPass /bosh/ http://localhost:5443/bosh/
ProxyPassReverse /bosh/ http://localhost:5443/bosh/
<Proxy http://localhost:5443/bosh/*>
Require all granted
</Proxy>
@@ -1,8 +0,0 @@
##
## On all sites, provide Matrix Synapse on a default path: /_matrix. This is
## only useful for clients to login without specifying a server port. This is
## not useful for federation which requires SRV record or listening on port
## 8448. Further, federation requires same TLS public key to be provided to
## Apache and Matrix Synapse server.
##
ProxyPass /_matrix http://localhost:8008/_matrix
@@ -1,21 +0,0 @@
<Directory /var/lib/mediawiki/>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/index.php/(.*)$ /$1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
</IfModule>
</Directory>
<Directory /var/lib/mediawiki/images>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
</Directory>
<Directory /var/lib/mediawiki/uploads>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
</Directory>
@@ -1,21 +0,0 @@
##
## On all sites, provide mldonkey web interface on a path: /mldonkey
##
# Redirect /mldonkey to /mldonkey/ as the MLdonkey server web interface does not
# work without a slash at the end.
<Location ~ ^/mldonkey$>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/mldonkey$
RewriteRule .* /mldonkey/ [R=301,L]
</IfModule>
</Location>
<Location /mldonkey/>
Include includes/freedombox-single-sign-on.conf
ProxyPass http://localhost:4080/
<IfModule mod_auth_pubtkt.c>
TKTAuthToken "admin" "ed2k"
</IfModule>
</Location>
@@ -1,53 +0,0 @@
# Proxy all PHP file requests through PHP-FPM.
#
# Based on /etc/apache2/conf-available/php7.3-fpm.conf but modified to not break
# when PHP version upgrade happens due to php-fpm package depending on the
# latest version of PHP. Since PHP-FPM unix sockets have version number their
# path, to work with future version of PHP, hack assuming some future versions.
# Redirect to local php-fpm if mod_php is not available
<IfModule !mod_php7.c>
<IfModule proxy_fcgi_module>
# Enable http authorization headers
<IfModule setenvif_module>
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
</IfModule>
<FilesMatch ".+\.ph(ar|p|tml)$">
<IfFile /etc/php/7.3>
SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost"
</IfFile>
<IfFile /etc/php/7.4>
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
</IfFile>
<IfFile /etc/php/7.5>
SetHandler "proxy:unix:/run/php/php7.5-fpm.sock|fcgi://localhost"
</IfFile>
<IfFile /etc/php/7.6>
SetHandler "proxy:unix:/run/php/php7.6-fpm.sock|fcgi://localhost"
</IfFile>
<IfFile /etc/php/8.0>
SetHandler "proxy:unix:/run/php/php8.0-fpm.sock|fcgi://localhost"
</IfFile>
<IfFile /etc/php/8.1>
SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost"
</IfFile>
<IfFile /etc/php/8.2>
SetHandler "proxy:unix:/run/php/php8.2-fpm.sock|fcgi://localhost"
</IfFile>
<IfFile /etc/php/8.3>
SetHandler "proxy:unix:/run/php/php8.3-fpm.sock|fcgi://localhost"
</IfFile>
</FilesMatch>
<FilesMatch ".+\.phps$">
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(ar|p|ps|tml)$">
Require all denied
</FilesMatch>
</IfModule>
</IfModule>
@@ -1,13 +0,0 @@
##
## On all sites, provide Radicale on a path: /radicale
## Allow all valid users.
##
Redirect 301 /.well-known/carddav /radicale/.well-known/carddav
Redirect 301 /.well-known/caldav /radicale/.well-known/caldav
<Location /radicale>
ProxyPass http://localhost:5232
Include includes/freedombox-auth-ldap.conf
Require valid-user
</Location>
@@ -1,24 +0,0 @@
##
## On all sites, provide Radicale on a path: /radicale
## Allow all valid users.
##
Redirect 301 /.well-known/carddav /radicale/
Redirect 301 /.well-known/caldav /radicale/
<Location ~ ^/radicale$>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/radicale$
RewriteRule .* /radicale/ [R=301,L]
</IfModule>
</Location>
<Location /radicale/>
Include includes/freedombox-auth-ldap.conf
Require valid-user
ProxyPass unix:/run/uwsgi/app/radicale/socket|uwsgi://radicale/
ProxyPassReverse unix:/run/uwsgi/app/radicale/socket|uwsgi://radicale/
RequestHeader set X-Script-Name /radicale/
RequestHeader set X-Remote-User expr=%{REMOTE_USER}
</Location>
@@ -1,11 +0,0 @@
##
## On all sites, provide repro admin interface on a path: /repro
## Only allow users of admin LDAP group.
##
<Location /repro>
ProxyPass http://localhost:5080
Include includes/freedombox-single-sign-on.conf
<IfModule mod_auth_pubtkt.c>
TKTAuthToken "admin"
</IfModule>
</Location>
@@ -1,26 +0,0 @@
# Redirect /searx to /searx/
<Location ~ ^/searx$>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/searx$
RewriteRule .* /searx/ [R=301,L]
</IfModule>
</Location>
<Location /searx/>
Include includes/freedombox-single-sign-on.conf
<IfModule mod_auth_pubtkt.c>
TKTAuthToken "web-search" "admin"
</IfModule>
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
</Location>
# This exclusion rule is to allow Searx to be added as a search engine in Firefox.
<LocationMatch "^/searx/(opensearch.xml|static/themes/oscar/img/favicon.png)$">
Require all granted
ProxyPassMatch "unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/$1"
</LocationMatch>
@@ -1,24 +0,0 @@
##
## On all sites, provide syncthing web interface on a path: /syncthing
##
# Redirect /syncthing to /syncthing/ as the Syncthing server does not
# work without a slash at the end.
<Location ~ ^/syncthing$>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/syncthing$
RewriteRule .* /syncthing/ [R=301,L]
</IfModule>
</Location>
<Location /syncthing/>
Include includes/freedombox-single-sign-on.conf
ProxyPass http://localhost:8384/
<IfModule mod_auth_pubtkt.c>
TKTAuthToken "admin" "syncthing"
</IfModule>
</Location>
@@ -1,14 +0,0 @@
# Tahoe-LAFS Storage Node web interface
Listen 5678
# XXX: SSL is not configured?
# TODO: Use subdomain?
<VirtualHost *:5678>
<Location "/">
Include includes/freedombox-auth-ldap.conf
Require ldap-group cn=admin,ou=groups,dc=thisbox
ProxyPass http://localhost:1234/
</Location>
</VirtualHost>
@@ -1,19 +0,0 @@
##
## On all sites, provide Transmission on a default path: /transmission
##
## Requires the following Apache modules to be enabled:
## mod_headers
## mod_proxy
## mod_proxy_http
##
<Location /transmission>
ProxyPass http://localhost:9091/transmission
Include includes/freedombox-single-sign-on.conf
<IfModule mod_auth_pubtkt.c>
TKTAuthToken "admin" "bit-torrent"
</IfModule>
## Send the scheme from user's request to enable Transmission to
## redirect URLs, set cookies, set absolute URLs (if any)
## properly.
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
</Location>
@@ -1,19 +0,0 @@
##
## On all sites, provide Tiny Tiny RSS on a default path: /tt-rss
## Allow all valid LDAP users.
##
Alias /tt-rss /usr/share/tt-rss/www
Alias /tt-rss-app /usr/share/tt-rss/www
<Location /tt-rss>
Include includes/freedombox-single-sign-on.conf
<IfModule mod_auth_pubtkt.c>
TKTAuthToken "feed-reader" "admin"
</IfModule>
</Location>
<Location /tt-rss-app>
Include includes/freedombox-auth-ldap.conf
Require valid-user
# TODO Restrict access to `feed-reader` group
</Location>
@@ -1,6 +0,0 @@
AuthType basic
AuthName "FreedomBox Login"
AuthBasicProvider ldap
AuthLDAPUrl "ldap:///ou=users,dc=thisbox?uid"
AuthLDAPGroupAttribute memberUid
AuthLDAPGroupAttributeIsDN off
@@ -1,2 +0,0 @@
Options +Indexes -FollowSymLinks -ExecCGI -Includes -IncludesNOEXEC
AllowOverride None
@@ -1,15 +0,0 @@
<IfModule mod_auth_pubtkt.c>
TKTAuthPublicKey /etc/apache2/auth-pubtkt-keys/pubkey.pem
TKTAuthLoginURL /plinth/accounts/sso/login/
TKTAuthBackArgName next
TKTAuthDigest SHA512
TKTAuthRefreshURL /plinth/accounts/sso/refresh/
TKTAuthUnauthURL /plinth
AuthType mod_auth_pubtkt
AuthName "FreedomBox Single Sign On"
Require valid-user
</IfModule>
<IfModule !mod_auth_pubtkt.c>
Require all denied
</IfModule>
-8
View File
@@ -1,8 +0,0 @@
// This configuration is installed by FreedomBox.
//
// When Apt's cache is updated (i.e. apt-cache update) notify FreedomBox service
// via it's D-Bus API. FreedomBox may then handle upgrade of some packages.
//
APT::Update::Post-Invoke-Success {
"/usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedombox.Service --object-path /org/freedombox/Service/PackageHandler --timeout 10 --method org.freedombox.Service.PackageHandler.CacheUpdated 2> /dev/null > /dev/null; /bin/echo > /dev/null";
};
@@ -1,16 +0,0 @@
// Remove unused automatically installed kernel-related packages
// (kernel images, kernel headers and kernel version locked tools).
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
Unattended-Upgrade::Remove-Unused-Dependencies "true";
// Allow upgrading from backports repository. This origin pattern is added to
// other configured patterns. This only works if the current distribution is a
// stable release. Also all backuports packages have a priority of 100 which is
// ignored. Only packages that have higher priority set explicitly will get
// upgraded. Only selected FreedomBox packages have high priority set on them.
Unattended-Upgrade::Origins-Pattern {
"o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports";
};
-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_sftp-ssh._tcp</type>
<port>22</port>
<txt-record>path=/home/fbx</txt-record>
<txt-record>u=fbx</txt-record>
</service>
</service-group>
-12
View File
@@ -1,12 +0,0 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>
@@ -1,12 +0,0 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_xmpp-server._tcp</type>
<port>5269</port>
</service>
</service-group>
@@ -1,2 +0,0 @@
[apache-auth]
enabled = true
@@ -1,2 +0,0 @@
[sshd]
enabled = true
-37
View File
@@ -1,37 +0,0 @@
# -*- mode: perl -*-
# Ikiwiki setup automator for Plinth (blog version).
require IkiWiki::Setup::Automator;
our $wikiname=$ARGV[0];
our $admin=$ARGV[1];
if (($wikiname eq "") || ($admin eq "")) {
print "Usage: ikiwiki -setup /etc/ikiwiki/plinth-blog.setup blog_name admin_name";
exit;
}
our $wikiname_short=IkiWiki::Setup::Automator::sanitize_wikiname($wikiname);
IkiWiki::Setup::Automator->import(
wikiname => $wikiname,
adminuser => [$admin],
rcs => "git",
srcdir => "/var/lib/ikiwiki/$wikiname_short",
destdir => "/var/www/ikiwiki/$wikiname_short",
repository => "/var/lib/ikiwiki/$wikiname_short.git",
dumpsetup => "/var/lib/ikiwiki/$wikiname_short.setup",
url => "/ikiwiki/$wikiname_short",
cgiurl => "/ikiwiki/$wikiname_short/ikiwiki.cgi",
cgiauthurl => "/ikiwiki-auth/$wikiname_short/ikiwiki.cgi",
cgi_wrapper => "/var/www/ikiwiki/$wikiname_short/ikiwiki.cgi",
add_plugins => [qw{goodstuff websetup comments calendar sidebar trail httpauth}],
rss => 1,
atom => 1,
syslog => 1,
example => "blog",
comments_pagespec => "posts/* and !*/Discussion",
archive_pagespec => "page(posts/*) and !*/Discussion",
global_sidebars => 0,
discussion => 0,
tagbase => "tags",
)
-31
View File
@@ -1,31 +0,0 @@
# -*- mode: perl -*-
# Ikiwiki setup automator for Plinth.
require IkiWiki::Setup::Automator;
our $wikiname=$ARGV[0];
our $admin=$ARGV[1];
if (($wikiname eq "") || ($admin eq "")) {
print "Usage: ikiwiki -setup /etc/ikiwiki/plinth-wiki.setup wiki_name admin_name";
exit;
}
our $wikiname_short=IkiWiki::Setup::Automator::sanitize_wikiname($wikiname);
IkiWiki::Setup::Automator->import(
wikiname => $wikiname,
adminuser => [$admin],
rcs => "git",
srcdir => "/var/lib/ikiwiki/$wikiname_short",
destdir => "/var/www/ikiwiki/$wikiname_short",
repository => "/var/lib/ikiwiki/$wikiname_short.git",
dumpsetup => "/var/lib/ikiwiki/$wikiname_short.setup",
url => "/ikiwiki/$wikiname_short",
cgiurl => "/ikiwiki/$wikiname_short/ikiwiki.cgi",
cgiauthurl => "/ikiwiki-auth/$wikiname_short/ikiwiki.cgi",
cgi_wrapper => "/var/www/ikiwiki/$wikiname_short/ikiwiki.cgi",
add_plugins => [qw{goodstuff websetup httpauth}],
rss => 1,
atom => 1,
syslog => 1,
)
-26
View File
@@ -1,26 +0,0 @@
<?php
# Default logo
$wgLogo = "$wgResourceBasePath/resources/assets/mediawiki.png";
# Enable file uploads
$wgEnableUploads = true;
# Public registrations
$wgGroupPermissions['*']['createaccount'] = false;
# Read/write permissions for anonymous users
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = true;
# Short urls
$wgArticlePath = "/mediawiki/$1";
$wgUsePathInfo = true;
# Instant Commons
$wgUseInstantCommons = true;
# SVG Enablement
$wgFileExtensions[] = 'svg';
$wgAllowTitlesInSVG = true;
$wgSVGConverter = 'ImageMagick';
@@ -1,23 +0,0 @@
#
# This file is part of FreedomBox.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
[Unit]
Description=FreedomBox: Setup software repositories
[Service]
ExecStart=/usr/share/plinth/actions/upgrades setup-repositories
Type=oneshot
@@ -1,27 +0,0 @@
#
# This file is part of FreedomBox.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
[Unit]
Description=FreedomBox: Daily check for setting up software repositories
[Timer]
OnCalendar=daily
AccuracySec=12h
Persistent=true
[Install]
WantedBy=multi-user.target
@@ -1,26 +0,0 @@
#
# This file is part of FreedomBox.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
[Unit]
Description=handle automounting
Documentation=man:udiskie(1)
[Service]
ExecStart=/usr/bin/udiskie
[Install]
WantedBy=multi-user.target
@@ -1,36 +0,0 @@
[Unit]
Description=MLDonkey: Multi-protocol, peer-to-peer file sharing server
After=syslog.target network.target
ConditionPathExists=/var/lib/mldonkey/downloads.ini
Documentation=man:mlnet(1) http://mldonkey.sourceforge.net/Main_Page
[Service]
ExecStart=
ExecStart=/usr/bin/mlnet
ExecStop=
Group=mldonkey
IgnoreSIGPIPE=yes
KillMode=control-group
LockPersonality=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateMounts=yes
PrivateTmp=yes
PrivateUsers=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
ReadWritePaths=/var/lib/mldonkey
RemainAfterExit=no
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictRealtime=yes
StateDirectory=mldonkey
SystemCallArchitectures=native
Type=simple
User=mldonkey
WorkingDirectory=/var/lib/mldonkey
[Install]
WantedBy=multi-user.target
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>infinoted</short>
<description>infinoted is a dedicated server for Gobby which allows clients to edit plain text documents and source files collaboratively over network. Enable this if you are running an infinoted server that helps Gobby clients to collaborate with each other.</description>
<port protocol="tcp" port="6523"/>
</service>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Matrix Synapse</short>
<description>Matrix is a Federated IM, VoIP and Video server. In Matrix, every user runs one or more Matrix clients, which connect through to a Matrix homeserver. The homeserver stores all their personal chat history and user account information, much as a mail client connects through to an IMAP/SMTP server. Enable this if you are running a Matrix Synapse homeserver to create local Matrix accounts that can federate with accounts on other servers.</description>
<port protocol="tcp" port="8448"/>
</service>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Minetest Server</short>
<description>Minetest is a multiplayer infinite-world block sandbox.</description>
<port protocol="udp" port="30000"/>
</service>
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Mumble Voice Chat Server</short>
<description>Mumble is an open source, low-latency, encrypted, high quality voice chat software primarily intended for use while gaming. Mumble uses a client-server architecture which allows users to talk to each other via the same server. Enable this if you are running a Mumble server and if you wish to connect external clients such as Mumble desktop client and Plumble Android app to your Mumble server.</description>
<port protocol="tcp" port="64738"/>
<port protocol="udp" port="64738"/>
</service>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Quassel IRC</short>
<description>Quassel is a distributed IRC client, meaning that one or more clients can attach to and detach from the central core.</description>
<port protocol="tcp" port="4242"/>
</service>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Real-time Transport Protocol</short>
<description>RTP is a protocol for delivering real-time data such as audio and video. Enable this if you run an internet telephony server using XMPP, SIP or H.323 and wish to enable audio and video communications.</description>
<port protocol="udp" port="1024-65535"/>
</service>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Shadowsocks client SOCKS5 proxy</short>
<description>Shadowsocks is a lightweight and secure SOCKS5 proxy, designed to protect your Internet traffic. Enable this service if you are running a Shadowsocks client, and want to provide a SOCKS5 proxy to clients on this network.</description>
<port protocol="tcp" port="1080"/>
</service>
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Tahoe-LAFS</short>
<description>Tahoe-LAFS is a distributed file storage system</description>
<port protocol="tcp" port="5678"/>
<port protocol="tcp" port="3456"/>
</service>
-79
View File
@@ -1,79 +0,0 @@
(*
Module: Pagekite
Parses /etc/pagekite.d/
Author: Michael Pimmer <blubb@fonfon.at>
About: License
This file is licenced under the LGPL v2+, like the rest of Augeas.
*)
module Pagekite =
autoload xfm
(* View: lns *)
(* Variables *)
let equals = del /[ \t]*=[ \t]*/ "="
let neg2 = /[^# \n\t]+/
let neg3 = /[^# \:\n\t]+/
let eol = del /\n/ "\n"
(* Match everything from here to eol, cropping whitespace at both ends *)
let to_eol = /[^ \t\n](.*[^ \t\n])?/
(* A key followed by comma-separated values
k: name of the key
key_sep: separator between key and values
value_sep: separator between values
sto: store for values
*)
let key_csv_line (k:string) (key_sep:lens) (value_sep:lens) (sto:lens) =
[ key k . key_sep . [ seq k . sto ] .
[ seq k . value_sep . sto ]* . Util.eol ]
(* entries for pagekite.d/10_account.rc *)
let domain = [ key "domain" . equals . store neg2 . Util.comment_or_eol ]
let frontend = Build.key_value_line ("frontend" | "frontends")
equals (store Rx.neg1)
let host = Build.key_value_line "host" equals (store Rx.ip)
let ports = key_csv_line "ports" equals Sep.comma (store Rx.integer)
let protos = key_csv_line "protos" equals Sep.comma (store Rx.word)
(* entries for pagekite.d/20_frontends.rc *)
let kitesecret = Build.key_value_line "kitesecret" equals (store Rx.space_in)
let kv_frontend = Build.key_value_line ( "kitename" | "fe_certname" |
"ca_certs" | "tls_endpoint" )
equals (store Rx.neg1)
(* entries for services like 80_httpd.rc *)
let service_colon = del /[ \t]*:[ \t]*/ " : "
let service_on = [ key "service_on" . [ seq "service_on" . equals .
[ label "protocol" . store neg3 ] . service_colon .
[ label "kitename" . (store neg3) ] . service_colon .
[ label "backend_host" . (store neg3) ] . service_colon .
[ label "backend_port" . (store neg3) ] . service_colon . (
[ label "secret" . (store Rx.no_spaces) . Util.eol ] | eol
) ] ]
let service_cfg = [ key "service_cfg" . equals . store to_eol . eol ]
let flags = ( "defaults" | "isfrontend" | "abort_not_configured" | "insecure" )
let entries = Build.flag_line flags
| domain
| frontend
| host
| ports
| protos
| kv_frontend
| kitesecret
| service_on
| service_cfg
let lns = ( entries | Util.empty | Util.comment )*
(* View: filter *)
let filter = incl "/etc/pagekite.d/*.rc"
. Util.stdexcl
let xfm = transform lns filter
@@ -1,111 +0,0 @@
module Test_Pagekite =
let conf1 = "# Use the pagekite.net service defaults.
defaults
"
test Pagekite.lns get conf1 =
{ "#comment" = "Use the pagekite.net service defaults." }
{ "defaults" }
let conf2 ="
frontends = pagekite.freedombox.me
ports=80,81
"
test Pagekite.lns get conf2 =
{ }
{ "frontends" = "pagekite.freedombox.me" }
{ "ports"
{ "1" = "80" }
{ "2" = "81" } }
let conf3 = "frontend=pagekite.freedombox.me
host=192.168.0.3
"
test Pagekite.lns get conf3 =
{ "frontend" = "pagekite.freedombox.me" }
{ "host" = "192.168.0.3" }
let conf4 = "isfrontend
ports=80,443
protos=http,https
domain=http,https:*.your.domain:MakeUpAPasswordHere
"
test Pagekite.lns get conf4 =
{ "isfrontend" }
{ "ports"
{ "1" = "80" }
{ "2" = "443" } }
{ "protos"
{ "1" = "http" }
{ "2" = "https" } }
{ "domain" = "http,https:*.your.domain:MakeUpAPasswordHere" }
let conf_account = "kitename = my.freedombox.me
kitesecret = 0420
# Delete this line!
abort_not_configured
"
test Pagekite.lns get conf_account =
{ "kitename" = "my.freedombox.me" }
{ "kitesecret" = "0420" }
{ "#comment" = "Delete this line!" }
{ "abort_not_configured" }
let conf_service = "
service_on = raw/22:@kitename : localhost:22 : @kitesecret
service_on=http:192.168.0.1:127.0.0.1:80:
service_on=https:yourhostname,fqdn:127.0.0.1:443:
"
test Pagekite.lns get conf_service =
{ }
{ "service_on"
{ "1"
{ "protocol" = "raw/22" }
{ "kitename" = "@kitename" }
{ "backend_host" = "localhost" }
{ "backend_port" = "22" }
{ "secret" = "@kitesecret" }
}
}
{ "service_on"
{ "2"
{ "protocol" = "http" }
{ "kitename" = "192.168.0.1" }
{ "backend_host" = "127.0.0.1" }
{ "backend_port" = "80" }
}
}
{ "service_on"
{ "3"
{ "protocol" = "https" }
{ "kitename" = "yourhostname,fqdn" }
{ "backend_host" = "127.0.0.1" }
{ "backend_port" = "443" }
}
}
let conf_encryption = "
frontend=frontend.your.domain:443
fe_certname=frontend.your/domain
ca_certs=/etc/pagekite.d/site-cert.pem
tls_endpoint=frontend.your.domain:/path/to/frontend.pem
"
test Pagekite.lns get conf_encryption =
{ }
{ "frontend" = "frontend.your.domain:443" }
{ "fe_certname" = "frontend.your/domain" }
{ "ca_certs" = "/etc/pagekite.d/site-cert.pem" }
{ "tls_endpoint" = "frontend.your.domain:/path/to/frontend.pem" }
let conf_service_cfg = "insecure
service_cfg = KITENAME.pagekite.me/80 : insecure : True
"
test Pagekite.lns get conf_service_cfg =
{ "insecure" }
{ "service_cfg" = "KITENAME.pagekite.me/80 : insecure : True" }
@@ -1,12 +0,0 @@
module Test_Tor =
test Tor.lns get "\n" = { }
test Tor.lns get "# comment\n" = { "#comment" = "comment" }
test Tor.lns get "SocksPort 9050\n" = { "SocksPort" = "9050" }
test Tor.lns get "SocksPort 0.0.0.0:9050\n" = { "SocksPort" = "0.0.0.0:9050" }
test Tor.lns get "SocksPort [::]:9050\n" = { "SocksPort" = "[::]:9050" }
test Tor.lns get "ExitPolicy reject *:*\n" = { "ExitPolicy" = "reject *:*" }
test Tor.lns get "VirtualAddrNetworkIPv4 10.192.0.0/10\n" = { "VirtualAddrNetworkIPv4" = "10.192.0.0/10" }
test Tor.lns get "ServerTransportPlugin obfs3,obfs4 exec /usr/bin/obfs4proxy\n" = { "ServerTransportPlugin" = "obfs3,obfs4 exec /usr/bin/obfs4proxy" }
test Tor.lns get "HiddenServiceDir /var/lib/tor-instances/plinth/hidden_service/\n" = { "HiddenServiceDir" = "/var/lib/tor-instances/plinth/hidden_service/" }
test Tor.lns get "Bridge obfs4 10.1.1.1:30000 0123456789ABCDEF0123456789ABCDEF01234567 cert=A/b+1 iat-mode=0\n" = { "Bridge" = "obfs4 10.1.1.1:30000 0123456789ABCDEF0123456789ABCDEF01234567 cert=A/b+1 iat-mode=0" }
-40
View File
@@ -1,40 +0,0 @@
(* Tor lens for Augeas
Author: James Valleroy <jvalleroy@mailbox.org>
About: Reference
Online Tor configuration manual:
https://www.torproject.org/docs/tor-manual.html.en
About: License
This file is licensed under the LGPL v2+.
About: Configuration files
This lens applies to /etc/tor/torrc. See <filter>.
*)
module Tor =
autoload xfm
let eol = Util.eol
let ws = /[ \t]/
let k = /[A-Za-z0-9_.,:*]+/
let val = /[A-Za-z0-9_.,:*+-=\/]+/
let bracket_val = "[" . val* . "]" . val*
let multi_val = val . (" " . val)+
let simple_entry = [ key k . del ws+ " " . store val . eol ]
let bracket_entry = [ key k . del ws+ " " . store bracket_val . eol ]
let multi_entry = [ key k . del ws+ " " . store multi_val . eol ]
let entry = simple_entry|bracket_entry|multi_entry
let lns = (entry|Util.comment|Util.empty_dos)*
let filter = (incl "/etc/tor/torrc")
let xfm = transform lns filter
@@ -1,6 +0,0 @@
Name: Restrict login using access control table file
Default: yes
Priority: 0
Account-Type: Additional
Account-Final:
required pam_access.so
@@ -1,6 +0,0 @@
Name: Create home directory during login
Default: yes
Priority: 900
Session-Type: Additional
Session:
required pam_mkhomedir.so umask=0022 skel=/etc/skel
@@ -1,25 +0,0 @@
/*
#
# This file is part of FreedomBox.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
*/
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &&
subject.user == "plinth") {
return polkit.Result.YES;
}
});
@@ -1,4 +0,0 @@
[Allow Plinth to manage NetworkManager connections]
Identity=unix-user:plinth
Action=org.freedesktop.NetworkManager.*
ResultAny=yes