Преглед изворни кода

Improved readability of the readme and comment in the config file

pull/40/head
Henri de Jong пре 7 година
родитељ
комит
3e7185d210
2 измењених фајлова са 18 додато и 16 уклоњено
  1. +10
    -10
      README.md
  2. +8
    -6
      log2ram.conf

+ 10
- 10
README.md Прегледај датотеку

@@ -1,7 +1,7 @@
# Log2Ram
Like ramlog for systemd (on debian 8 jessie for example).

Usefull for **Raspberry** for not writing all the time on the SD card. You need it because your SD card don't want to suffer anymore !
Usefull for **RaspberryPi** for not writing on the SD card all the time. You need it because your SD card doesn't want to suffer anymore!

The script [log2ram](https://github.com/azlux/log2ram) can work on every linux system. So you can use it with your own daemon manager if you don't have systemd.

@@ -18,27 +18,27 @@ sudo ./install.sh

## Customize
#### variables :
Into the file `/etc/log2ram.conf`, there are three variables :
In the file `/etc/log2ram.conf`, there are three variables:

- The first variable define the size the log folder will reserve into the RAM.
- The second variable can be set to `true` if you prefer "rsync" than "cp". I use the command `cp -u` and `rsync -X`, I don't copy the all folder every time for optimization.
- The last varibale disable the error system mail if there are no enought place on RAM (if set on false)
- `SIZE`: defines the size the log folder will reserve into the RAM.
- `USE_RSYNC`: Can be set to `true` if you prefer "rsync" rather than "cp". I use the command `cp -u` and `rsync -X`, I don't copy the all folder every time for optimization.
- `MAIL`: Disables the error system mail if there is not enough place on RAM (if set to `false`)

#### refresh time:
The default is to write log into the HardDisk every hour. If you think this is too much, you can make the write every day by moving the cron file : `sudo mv /etc/cron.hourly/log2ram /etc/cron.daily/log2ram`.
By default Log2Ram writes to the HardDisk every hour. If you think this is too much, you can make the write every day by moving the cron file to daily: `sudo mv /etc/cron.hourly/log2ram /etc/cron.daily/log2ram`.

### It is working ?
### It is working?
You can now check the mount folder in ram with (You will see lines with log2ram if working)
```
df -h
mount
```

If you have issue with apache2 , you can try to add `apache2.service` next to other services on the `Before` parameter into /etc/systemd/system/log2ram.service it will solve the pb
If you have issue with apache2, you can try to add `apache2.service` next to other services on the `Before` parameter in `/etc/systemd/system/log2ram.service` it will solve the pb

The log for log2ram will be write here : `/var/hdd.log/log2ram.log`
The log for log2ram will be written at: `/var/hdd.log/log2ram.log`

###### Now, muffins for everyone !
###### Now, muffins for everyone!


## Uninstall :(


+ 8
- 6
log2ram.conf Прегледај датотеку

@@ -1,15 +1,17 @@
# Configuration file for Log2Ram (https://github.com/azlux/log2ram) under MIT license.
# This configuration file is read by the log2ram service
# Size for the ram folder, it's define the size the log folder will reserve into the RAM. If it's not enough, log2ram will not be able to use ram. Check you /var/log size folder. The default is 40M and is basically enough for a lot of application. You will need to increase it if you have a server and a lot of log for example.

# Size for the ram folder, it defines the size the log folder will reserve into the RAM.
# If it's not enough, log2ram will not be able to use ram. Check you /var/log size folder.
# The default is 40M and is basically enough for a lot of applications.
# You will need to increase it if you have a server and a lot of log for example.
SIZE=40M

# This variable can be set to true if you prefer "rsync" than "cp". I use the command cp -u and rsync -X, so I don't copy the all folder every time for optimization.
# This variable can be set to true if you prefer "rsync" rather than "cp".
# I use the command cp -u and rsync -X, so I don't copy the all folder every time for optimization.
# You can choose which one you want. Be sure rsync is installed if you use it.

USE_RSYNC=false

# If there are some error with available RAM space, a system mail will be send
# Change it to false, and you will have only log if there are no place on RAM anymore.

# If there are some errors with available RAM space, a system mail will be send
# Change it to false and you will have only a log if there is no place on RAM anymore.
MAIL=true

Loading…
Откажи
Сачувај