# quick script to apply replay gain after changing settings iu

**URL:** <https://community.volumio.com/t/quick-script-to-apply-replay-gain-after-changing-settings-iu/3076>\
**Category:** Diy and Tweaks\
**Created:** [August 4, 2015, 10:22am UTC](https://community.volumio.com/t/quick-script-to-apply-replay-gain-after-changing-settings-iu/3076 "2015-08-04T10:22:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Overlord\_Laharl](https://community.volumio.com/user_avatar/community.volumio.com/overlord_laharl/32/191_2.png) [@Overlord\_Laharl](https://community.volumio.com/u/Overlord_Laharl)\
**Post date:** [August 4, 2015, 10:22am UTC](https://community.volumio.com/t/quick-script-to-apply-replay-gain-after-changing-settings-iu/3076/1 "2015-08-04T10:22:59Z")

</div>

okay i would like to thank wilddash wood for the basic comands in this script  
the comands were initally found in this thread [replaygain-supported-t497.html](https://volumio.org/forum/replaygain-supported-t497.html)

these were tested on a raspberry pi running volumio 1.55  
first to get this on your install you will need ssh access, i recommend bitvise SSH or putty

first make a backup of your install using any method at your disposal  
windows users use “win32diskimager”  
linux users use dd  
mac do what you do

for reference the default credentials are  
user: root  
pass: volumio

log in to your system and type `
nano
`

in the terminal window paste or type the following

[code]#!/bin/sh

# this script will add replay gain back to mpd.conf

# after saving settings with the web ui

# comands were obtained from [[Solved] Is ReplayGain supported? - Help - Volumio Community](https://volumio.org/forum/replaygain-supported-t497.html)

# short link to above thread - [http://tinyurl.com/ne56rxm](http://tinyurl.com/ne56rxm)

echo ‘replaygain “album”’ \>\> /etc/mpd.conf  
echo ‘replaygain\_preamp “0”’ \>\> /etc/mpd.conf  
echo ‘replaygain\_limit “yes”’ \>\> /etc/mpd.conf

/etc/init.d/mpd restart[/code]

press “ctrl+x”  
type “y” when it asks “save unmodified buffer”  
give it a name with the file extension of “.sh”  
i name it “rg-apply.sh”  
remember the filename

next lets make it executable type

`chmod +x [your flename]
`my command is `
chmod +x rg-apply.sh
`

now you can execute it by typing

```auto
./rg-apply.sh
```

also note if you followed my instructions the script will be saved in /root as rg-apply.sh (full path “/root/rg-apply.sh”)

tips for the linux beginner  
the linux shell is CaSe SeNsItIvE (“nano” is not the same as “Nano”)  
when you save your playback settings in the web ui you will need to run the script again because the file will be over written  
if you are getting permission denied for any of these commands put sudo in the front of it

> [@](#):
>
> chmod +x rg-apply.sh becomes sudo chmod +x rg-apply.sh

if after typing sudo, it asks for a password type “volumio” and press enter (you can not see what you type, its a security feature of linux)
