From f6b3822e9516716b9c986f59f928ad6a4462227d Mon Sep 17 00:00:00 2001 From: thomas Date: Fri, 25 Feb 2022 00:16:47 +0100 Subject: [PATCH] Add tt-rss joplin 2.7.13 --- README.MD | 22 ++++++++++- joplin2deb | 2 +- lib/function.sh | 5 +++ ressources/tt-rss/rootfs/DEBIAN/changelog | 0 ressources/tt-rss/rootfs/DEBIAN/conffiles | 1 + ressources/tt-rss/rootfs/DEBIAN/control | 8 ++++ ressources/tt-rss/rootfs/DEBIAN/postinst | 2 + .../rootfs/etc/systemd/system/tt-rss.service | 14 +++++++ .../usr/share/doc/tt-rss/apache2-tt-rss.conf | 12 ++++++ ressources/tt-rss/tt-rss | 37 +++++++++++++++++++ tt-rss2deb | 10 +++++ 11 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 ressources/tt-rss/rootfs/DEBIAN/changelog create mode 100644 ressources/tt-rss/rootfs/DEBIAN/conffiles create mode 100644 ressources/tt-rss/rootfs/DEBIAN/control create mode 100755 ressources/tt-rss/rootfs/DEBIAN/postinst create mode 100644 ressources/tt-rss/rootfs/etc/systemd/system/tt-rss.service create mode 100644 ressources/tt-rss/rootfs/usr/share/doc/tt-rss/apache2-tt-rss.conf create mode 100755 ressources/tt-rss/tt-rss create mode 100755 tt-rss2deb diff --git a/README.MD b/README.MD index 6a0a8eb..37087d4 100644 --- a/README.MD +++ b/README.MD @@ -19,6 +19,7 @@ debmaker_run - [grocy](#grocy) - [joplin-server](#joplin-server) - [rss-bridge](#rss-bridge) + - [tt-rss](#tt-rss) - [vaultwarden and vaultwarden-web](#vaultwarden-and-vaultwarden-web) - [wallabag](#wallabag) - [zigbee2mqtt](#zigbee2mqtt) @@ -70,7 +71,6 @@ a2enconf php8.1-fpm cp /usr/share/doc/grocy/apache2-grocy.conf /etc/apache2/sites-available/grocy.conf a2ensite grocy systemctl restart apache2 - ``` #### joplin-server @@ -104,6 +104,26 @@ a2ensite rss-bridge systemctl restart apache2 ``` +#### tt-rss +```bash +apt install -y wget ca-certificates +wget -qO - https://deb.lgy.fr/install.sh | bash +apt-get update +apt-get install -y tt-rss + +#Edit /etc/tt-rss/config.php +systemctl enable --now tt-rss + +# sample configuration for apache2 + php fpm +apt install apache2 php-fpm +a2enmod proxy_fcgi setenvif +a2enconf php7.4-fpm +cp /usr/share/doc/grocy/apache2-tt-rss.conf /etc/apache2/sites-available/tt-rss.conf +#edit /etc/apache2/sites-available/tt-rss.conf +a2ensite tt-rss +systemctl restart apache2 +``` + #### vaultwarden and vaultwarden-web ```bash diff --git a/joplin2deb b/joplin2deb index d7ede49..ebcd4a0 100755 --- a/joplin2deb +++ b/joplin2deb @@ -1,7 +1,7 @@ #!/bin/bash APP=joplin -VERSION=2.7.12 +VERSION=2.7.13 GIT_VERSION=$VERSION DEB_VERSION=$VERSION-1 DEBIAN_VERSION_CODENAME=bullseye diff --git a/lib/function.sh b/lib/function.sh index edb7e87..f6828db 100644 --- a/lib/function.sh +++ b/lib/function.sh @@ -4,12 +4,15 @@ DEBOOTSTRAP_DIR=cache/debootstrap/ MOUNT_PATH=/mnt/debmaker zdebmaker_getDep(){ + [ -d cache ] || mkdir cache + [ -d dist ] || mkdir dist [ -d ${DEBOOTSTRAP_DIR} ] || debmaker_debootstrapUpdate } zdebmaker_createOS(){ dd if=/dev/zero of=cache/${DEBIAN_VERSION_CODENAME}.tmp bs=100M count=5 sudo mkfs.ext4 cache/${DEBIAN_VERSION_CODENAME}.tmp + [ -d ${MOUNT_PATH}/${DEBIAN_VERSION_CODENAME}/ ] || sudo mkdir -p ${MOUNT_PATH}/${DEBIAN_VERSION_CODENAME}/ sudo mount cache/${DEBIAN_VERSION_CODENAME}.tmp ${MOUNT_PATH}/${DEBIAN_VERSION_CODENAME} sudo DEBOOTSTRAP_DIR=cache/debootstrap/ ${DEBOOTSTRAP_DIR}/debootstrap ${DEBIAN_VERSION_CODENAME} ${MOUNT_PATH}/${DEBIAN_VERSION_CODENAME}/ sudo umount ${MOUNT_PATH}/${DEBIAN_VERSION_CODENAME} @@ -23,6 +26,8 @@ zdebmaker_createAppOS(){ dd if=/dev/zero of=cache/${APP}.tmp bs=1G count=${IMAGE_SIZE} sudo mkfs.ext4 cache/${APP}.tmp + [ -d ${MOUNT_PATH}/${APP}/ ] || sudo mkdir -p ${MOUNT_PATH}/${APP}/ + [ -d ${MOUNT_PATH}/${DEBIAN_VERSION_CODENAME}/ ] || sudo mkdir -p ${MOUNT_PATH}/${DEBIAN_VERSION_CODENAME}/ sudo mount cache/${APP}.tmp ${MOUNT_PATH}/${APP}/ sudo mount cache/${DEBIAN_VERSION_CODENAME} ${MOUNT_PATH}/${DEBIAN_VERSION_CODENAME} sudo rsync -h -X -A --numeric-ids -aH --no-whole-file --inplace --one-file-system ${MOUNT_PATH}/${DEBIAN_VERSION_CODENAME}/* ${MOUNT_PATH}/${APP}/ diff --git a/ressources/tt-rss/rootfs/DEBIAN/changelog b/ressources/tt-rss/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/tt-rss/rootfs/DEBIAN/conffiles b/ressources/tt-rss/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..092d2ab --- /dev/null +++ b/ressources/tt-rss/rootfs/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/tt-rss/config.php diff --git a/ressources/tt-rss/rootfs/DEBIAN/control b/ressources/tt-rss/rootfs/DEBIAN/control new file mode 100644 index 0000000..ed5348a --- /dev/null +++ b/ressources/tt-rss/rootfs/DEBIAN/control @@ -0,0 +1,8 @@ +Package: tt-rss +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Depends: php-pgsql, php-mysql, php-intl, php-mbstring, php-xml +Maintainer: Thomas Legay +Description: tt-rss diff --git a/ressources/tt-rss/rootfs/DEBIAN/postinst b/ressources/tt-rss/rootfs/DEBIAN/postinst new file mode 100755 index 0000000..3e20645 --- /dev/null +++ b/ressources/tt-rss/rootfs/DEBIAN/postinst @@ -0,0 +1,2 @@ +#!/bin/bash +chown -R www-data:www-data /var/lib/tt-rss/ diff --git a/ressources/tt-rss/rootfs/etc/systemd/system/tt-rss.service b/ressources/tt-rss/rootfs/etc/systemd/system/tt-rss.service new file mode 100644 index 0000000..9d27e72 --- /dev/null +++ b/ressources/tt-rss/rootfs/etc/systemd/system/tt-rss.service @@ -0,0 +1,14 @@ +[Unit] +Description=ttrss_backend + +After=network.target + + +[Service] +User=www-data +ExecStart=/usr/share/tt-rss/update_daemon2.php +Restart=on-failure +RestartSec=60 + +[Install] +WantedBy=multi-user.target diff --git a/ressources/tt-rss/rootfs/usr/share/doc/tt-rss/apache2-tt-rss.conf b/ressources/tt-rss/rootfs/usr/share/doc/tt-rss/apache2-tt-rss.conf new file mode 100644 index 0000000..ce014d3 --- /dev/null +++ b/ressources/tt-rss/rootfs/usr/share/doc/tt-rss/apache2-tt-rss.conf @@ -0,0 +1,12 @@ + + servername tt-rss.domain.com + + DocumentRoot /usr/share/tt-rss/ + Protocols h2c http/1.1 + + + Options -Indexes -MultiViews +FollowSymLinks + AllowOverride all + Require all granted + + diff --git a/ressources/tt-rss/tt-rss b/ressources/tt-rss/tt-rss new file mode 100755 index 0000000..fede619 --- /dev/null +++ b/ressources/tt-rss/tt-rss @@ -0,0 +1,37 @@ +#!/bin/bash + +STEP="envinit prebuild makedeb" +# build + +envinit() { + apt-get install -y --no-install-recommends wget ca-certificates fakeroot dpkg git +} + +prebuild(){ + rm -fr /tmp/tt-rss + git clone --depth 1 https://git.tt-rss.org/fox/tt-rss.git /tmp/tt-rss +} + +build() { + cd /tmp/tt-rss +} + +makedeb(){ + GIT_VERSION=$1 + DEB_VERSION=$2 + PATH_DEB=/tmp/src/rootfs + + cp -fr /tmp/tt-rss/* ${PATH_DEB}/usr/share/tt-rss/ + mv ${PATH_DEB}/usr/share/tt-rss/cache ${PATH_DEB}/var/lib/tt-rss/ + mv ${PATH_DEB}/usr/share/tt-rss/feed-icons ${PATH_DEB}/var/lib/tt-rss/ + mv ${PATH_DEB}/usr/share/tt-rss/lock ${PATH_DEB}/var/lib/tt-rss/ + mv ${PATH_DEB}/usr/share/tt-rss/config.php-dist ${PATH_DEB}/etc/tt-rss/config.php + + ln -s /var/lib/tt-rss/cache ${PATH_DEB}/usr/share/tt-rss/cache + ln -s /var/lib/tt-rss/feed-icons ${PATH_DEB}/usr/share/tt-rss/feed-icons + ln -s /var/lib/tt-rss/lock ${PATH_DEB}/usr/share/tt-rss/lock + + ln -s /etc/tt-rss/config.php ${PATH_DEB}/usr/share/tt-rss/config.php + sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control + fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist +} diff --git a/tt-rss2deb b/tt-rss2deb new file mode 100755 index 0000000..37b710c --- /dev/null +++ b/tt-rss2deb @@ -0,0 +1,10 @@ +#!/bin/bash + +APP=tt-rss +VERSION=$(date +%Y%m.%d.%H%M) +GIT_VERSION=$VERSION +DEB_VERSION=$VERSION +DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE=1 + +source ./lib/function.sh