mirror of
https://github.com/azlux/log2ram.git
synced 2023-10-10 13:37:24 +02:00
Create log2ram.initd
Init-File for Gentoo/OpenRC Init-System
This commit is contained in:
parent
0dc5827f5c
commit
bbb3023417
31
log2ram.initd
Normal file
31
log2ram.initd
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
# Init-Skript for log2ram
|
||||||
|
# This skript is designed to work on Gentoo Linux with OpenRC
|
||||||
|
|
||||||
|
description="Store logfiles in RAM to mimimize writes to disk."
|
||||||
|
|
||||||
|
. /etc/log2ram.conf # Include configuration of log2ram
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need localmount
|
||||||
|
before logger
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Starting Log2Ram"
|
||||||
|
/usr/local/bin/log2ram start
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping Log2Ram"
|
||||||
|
/usr/local/bin/log2ram stop
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
ebegin "Syncing logs to disk"
|
||||||
|
/usr/local/bin/log2ram write
|
||||||
|
eend $?
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user