mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
Debian packages
Yeah !
This commit is contained in:
parent
1b8025aa91
commit
13d0058086
@ -18,7 +18,13 @@ _____
|
||||
5. [Uninstall](#uninstall-)
|
||||
|
||||
## Install
|
||||
### With APT (recommended)
|
||||
echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list`
|
||||
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -`
|
||||
apt update`
|
||||
apt install log2ram`
|
||||
|
||||
### Manually
|
||||
curl -Lo log2ram.tar.gz https://github.com/azlux/log2ram/archive/master.tar.gz
|
||||
tar xf log2ram.tar.gz
|
||||
cd log2ram-master
|
||||
|
36
build-packages.sh
Normal file
36
build-packages.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Exit the script if any of the commands fail
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
# Set working directory to the location of this script
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
STARTDIR="$(pwd)"
|
||||
DESTDIR="$STARTDIR/pkg"
|
||||
OUTDIR="$STARTDIR/deb"
|
||||
|
||||
# Remove potential leftovers from a previous build
|
||||
rm -rf "$DESTDIR" "$OUTDIR"
|
||||
|
||||
|
||||
## log2ram
|
||||
# Create directory
|
||||
install -Dm 644 "$STARTDIR/log2ram.service" "$DESTDIR/etc/systemd/system/log2ram.service"
|
||||
install -Dm 755 "$STARTDIR/log2ram" "$DESTDIR/usr/local/bin/log2ram"
|
||||
install -Dm 644 "$STARTDIR/log2ram.conf" "$DESTDIR/etc/log2ram.conf"
|
||||
install -Dm 644 "$STARTDIR/uninstall.sh" "$DESTDIR/usr/local/bin/uninstall-log2ram.sh"
|
||||
|
||||
# cron
|
||||
install -Dm 755 "$STARTDIR/log2ram.cron" "$DESTDIR/etc/cron.daily/log2ram"
|
||||
install -Dm 644 "$STARTDIR/log2ram.logrotate" "$DESTDIR/etc/logrotate.d/log2ram"
|
||||
|
||||
# Build .deb
|
||||
mkdir "$DESTDIR/DEBIAN" "$OUTDIR"
|
||||
cp "$STARTDIR/debian/"* "$DESTDIR/DEBIAN/"
|
||||
dpkg-deb --build "$DESTDIR" "$OUTDIR"
|
||||
reprepro -b /var/www/repos/apt/debian includedeb buster "$OUTDIR"/*.deb
|
||||
reprepro -b /var/www/repos/apt/debian includedeb stretch "$OUTDIR"/*.deb
|
||||
|
1
debian/conffiles
vendored
Normal file
1
debian/conffiles
vendored
Normal file
@ -0,0 +1 @@
|
||||
/etc/log2ram.conf
|
9
debian/control
vendored
Normal file
9
debian/control
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
Package: log2ram
|
||||
Version: 1.4
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Maintainer: Azlux <github@azlux.fr>
|
||||
Description: ramlog like for systemd (Put log into a ram folder)
|
||||
Homepage: https://github.com/azlux/log2ram
|
||||
Bugs: https://github.com/azlux/log2ram/issues
|
6
debian/postinst
vendored
Normal file
6
debian/postinst
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
systemctl enable log2ram
|
||||
echo "##### Reboot to activate log2ram #####"
|
||||
echo "##### edit /etc/log2ram.conf to configure options ####"
|
5
debian/preinst
vendored
Normal file
5
debian/preinst
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
systemctl -q is-active log2ram && systemctl stop log2ram
|
||||
rm -rf /var/hdd.log
|
2
debian/prerm
vendored
Normal file
2
debian/prerm
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
systemctl stop log2ram.service
|
Loading…
Reference in New Issue
Block a user