mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Add interpreter adaptation for service, with documentation
This commit is contained in:
parent
cce48878e7
commit
9086a5d9b1
5 changed files with 70 additions and 1 deletions
3
dist/arch/PKGBUILD
vendored
3
dist/arch/PKGBUILD
vendored
|
@ -39,7 +39,6 @@ package() {
|
|||
cp -r lib locale sql vendor www CHANGELOG UPGRADING README.md arsse.php "$pkgdir/usr/share/webapps/arsse"
|
||||
cp -r manual/* "$pkgdir/usr/share/doc/arsse"
|
||||
cp LICENSE AUTHORS "$pkgdir/usr/share/licenses/arsse"
|
||||
cp dist/systemd/* "$pkgdir/usr/lib/systemd/system"
|
||||
cp dist/sysuser.conf "$pkgdir/usr/lib/sysusers.d/arsse.conf"
|
||||
cp dist/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/arsse.conf"
|
||||
cp dist/php-fpm.conf "$pkgdir/etc/php/php-fpm.d/arsse.conf"
|
||||
|
@ -58,4 +57,6 @@ package() {
|
|||
install -Dm755 dist/arch/arsse "$pkgdir/usr/bin/arsse"
|
||||
cp dist/arch/nginx-arsse-fcgi.conf "$pkgdir/etc/webapps/arsse/nginx/arsse-fcgi.conf"
|
||||
cp dist/arch/apache-arsse-fcgi.conf "$pkgdir/etc/webapps/arsse/apache/arsse-fcgi.conf"
|
||||
cp dist/arch/*.service "$pkgdir/usr/lib/systemd/system"
|
||||
cp dist/arch/systemd-environment "$pkgdir/etc/webapps/arsse/systemd-environment"
|
||||
}
|
||||
|
|
37
dist/arch/arsse-fetch.service
vendored
Normal file
37
dist/arch/arsse-fetch.service
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
[Unit]
|
||||
Description=The Arsse newsfeed fetching service
|
||||
Documentation=https://thearsse.com/manual/
|
||||
PartOf=arsse.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
User=arsse
|
||||
Group=arsse
|
||||
Type=simple
|
||||
WorkingDirectory=/usr/share/webapps/arsse
|
||||
EnvironmentFile=/etc/webapps/arsse/systemd-environment
|
||||
ExecStart=/usr/bin/arsse daemon
|
||||
|
||||
ProtectProc=invisible
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
StateDirectory=arsse
|
||||
ConfigurationDirectory=arsse
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
RestrictSUIDSGID=true
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=arsse
|
||||
Restart=on-failure
|
||||
RestartPreventStatus=
|
||||
|
||||
# These directives can be used for extra security, but are disabled for now for compatibility
|
||||
|
||||
#ReadOnlyPaths=/
|
||||
#ReadWriePaths=/var/lib/arsse
|
||||
#NoExecPaths=/
|
||||
#ExecPaths=/usr/bin/php
|
13
dist/arch/arsse.service
vendored
Normal file
13
dist/arch/arsse.service
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=The Arsse newsfeed management service
|
||||
Documentation=https://thearsse.com/manual/
|
||||
Requires=arsse-fetch.service
|
||||
Wants=php-fpm.service php-legacy-fpm.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
ExecStart=/usr/bin/true
|
1
dist/arch/systemd-environment
vendored
Normal file
1
dist/arch/systemd-environment
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
ARSSE_PHP=/usr/bin/php
|
|
@ -35,6 +35,23 @@ LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
|
|||
|
||||
No additional set-up is required for Nginx.
|
||||
|
||||
# Using an alternative PHP interpreter
|
||||
|
||||
The above instructions assume you will be using the `php` package as your PHP interpreter. If you wish to use `php-legacy` (which is always one feature version behind, for compatibility) a few configuration tweaks are required. The follwoing commands are a short summary:
|
||||
|
||||
```sh
|
||||
# Enable the necessary PHP extensions; curl is optional but recommended; pdo_sqlite may be used instead of sqlite3, but this is not recommended
|
||||
sudo sed -i -e 's/^;\(extension=\(curl\|iconv\|intl\|sqlite3\)\)$/\1/' /etc/php-legacy/php.ini
|
||||
# Modify the system service's environment
|
||||
sudo sed -i -e 's/^ARSSE_PHP=.*/ARSSE_PHP=\/usr\/bin\/php-legacy/' /etc/webapps/arsse/systemd-environment
|
||||
# Modify the PAM environment for the administrative CLI
|
||||
echo "export ARSSE_PHP=/usr/bin/php-legacy" | sudo tee -a /etc/profile.d/arsse >/dev/null
|
||||
# Modify the Nginx and Apache HTTPD configurations
|
||||
sudo sed -i -se 's/\/run\/php-fpm\//\/run\/php-fpm-legacy\//' /etc/webapps/arsse/apache/arsse-fcgi.conf /etc/webapps/arsse/nginx/arsse-fcgi.conf
|
||||
```
|
||||
|
||||
The above procedure can also be applied to use another PHP version from AUR if so desired.
|
||||
|
||||
# Next steps
|
||||
|
||||
If using a database other than SQLite, you will likely want to [set it up](/en/Getting_Started/Database_Setup) before doing anything else.
|
||||
|
|
Loading…
Reference in a new issue