Pārlūkot izejas kodu

Debian packages

Yeah !
tags/1.4.1
Azlux pirms 4 gadiem
vecāks
revīzija
13d0058086
7 mainītis faili ar 65 papildinājumiem un 0 dzēšanām
  1. +6
    -0
      README.md
  2. +36
    -0
      build-packages.sh
  3. +1
    -0
      debian/conffiles
  4. +9
    -0
      debian/control
  5. +6
    -0
      debian/postinst
  6. +5
    -0
      debian/preinst
  7. +2
    -0
      debian/prerm

+ 6
- 0
README.md Parādīt failu

@@ -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
- 0
build-packages.sh Parādīt failu

@@ -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
- 0
debian/conffiles Parādīt failu

@@ -0,0 +1 @@
/etc/log2ram.conf

+ 9
- 0
debian/control Parādīt failu

@@ -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
- 0
debian/postinst Parādīt failu

@@ -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
- 0
debian/preinst Parādīt failu

@@ -0,0 +1,5 @@
#!/bin/bash
set -euo pipefail

systemctl -q is-active log2ram && systemctl stop log2ram
rm -rf /var/hdd.log

+ 2
- 0
debian/prerm Parādīt failu

@@ -0,0 +1,2 @@
#!/usr/bin/env bash
systemctl stop log2ram.service

Notiek ielāde…
Atcelt
Saglabāt