Browse Source

Resolved conflict

pull/39/head
Nathan Huizinga 7 years ago
parent
commit
a66120b94a
3 changed files with 19 additions and 17 deletions
  1. +10
    -10
      README.md
  2. +1
    -1
      install.sh
  3. +8
    -6
      log2ram.conf

+ 10
- 10
README.md View File

@@ -1,7 +1,7 @@
# Log2Ram # Log2Ram
Like ramlog for systemd (on debian 8 jessie for example). 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. 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 ## Customize
#### variables : #### 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: #### 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) You can now check the mount folder in ram with (You will see lines with log2ram if working)
``` ```
df -h df -h
mount 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/log/log2ram.log`
The log for log2ram will be written at: `/var/log/log2ram.log`


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




## Uninstall :( ## Uninstall :(


+ 1
- 1
install.sh View File

@@ -18,7 +18,7 @@ then
chmod 644 /etc/logrotate.d/log2ram chmod 644 /etc/logrotate.d/log2ram


# Remove a previous log2ram version # Remove a previous log2ram version
if [ -d /var/log.hdd]; then
if [ -d /var/log.hdd ]; then
rm -r /var/log.hdd rm -r /var/log.hdd
fi fi




+ 8
- 6
log2ram.conf View File

@@ -1,15 +1,17 @@
# Configuration file for Log2Ram (https://github.com/azlux/log2ram) under MIT license. # Configuration file for Log2Ram (https://github.com/azlux/log2ram) under MIT license.
# This configuration file is read by the log2ram service # 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 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. # You can choose which one you want. Be sure rsync is installed if you use it.

USE_RSYNC=false 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 MAIL=true

Loading…
Cancel
Save