Skip to content

Commit

Permalink
add logrotate for apshd, #68.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwq committed Mar 22, 2024
1 parent d28fae2 commit 7d89743
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ depends="$pkgname-client $pkgname-server"
makedepends="go protoc utmps-dev ncurses ncurses-terminfo musl-locales protoc-gen-go"
subpackages="$pkgname-client $pkgname-server $pkgname-openrc"
source="https://github.com/ericwq/aprilsh/releases/download/$pkgver/aprilsh-$pkgver.tar.gz
apshd.logrotate
apshd.initd"

# build info (part 1) required by go build
Expand Down Expand Up @@ -73,6 +74,7 @@ package() {
install -Dm755 "$builddir/bin/apshd" "$pkgdir/usr/bin/apshd"
install -Dm755 "$builddir/bin/apsh" "$pkgdir/usr/bin/apsh"
install -Dm755 "$srcdir/apshd.initd" "$pkgdir/etc/init.d/apshd"
install -Dm644 "$srcdir/apshd.logrotate" "$pkgdir/etc/logrotate.d/apshd"
}

client() {
Expand Down
10 changes: 10 additions & 0 deletions build/apshd.logrotate
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/var/log/apshd.log {
missingok
copytruncate
create 0640 root adm
rotate 3
size 5M
dateext
dateformat -%d-%m-%Y
notifempty
}

0 comments on commit 7d89743

Please sign in to comment.