<commit_before>
# How to upgrade the Phoniebox code

Assuming that you use `git pull` to update the code base of your Phoniebox,
every now and then you need to run some update scripts, like patches.
To make this somewhat consistent, I started this page to document things that need to be done.

Some elements of the installation depend on the OS (like 'Jessie' vs. 'Stretch'). These differences might not be covered by the update script below. If you still encounter problems after running these scripts, check inside the folder `scripts/installscripts/` for scripts which contain the entire install process. They are not perfect and flexible, but they might also give you more insight into things you would need to do in case your upgrade does not work out of the box.

## Which version am I on?

There is a file `settings/version` containing the version number.

# Upgrade to Version 1.0

As of version 1.0 there is a much simpler install procedure: copy and paste one line into your terminal and hit *enter*. Find out more about the [one-line Phoniebox install script](INSTALL-stretch.md#oneLineInstall).
<commit_msg>upgrade procedure to 1.1.0<commit_after>
# How to upgrade the Phoniebox code

Assuming that you use `git pull` to update the code base of your Phoniebox,
every now and then you need to run some update scripts, like patches.
To make this somewhat consistent, I started this page to document things that need to be done.

Some elements of the installation depend on the OS (like 'Jessie' vs. 'Stretch'). These differences might not be covered by the update script below. If you still encounter problems after running these scripts, check inside the folder `scripts/installscripts/` for scripts which contain the entire install process. They are not perfect and flexible, but they might also give you more insight into things you would need to do in case your upgrade does not work out of the box.

## Which version am I on?

There is a file `settings/version` containing the version number.

**Note:*** This is work in progress, please share experience, improvements and insights in the [issue section](https://github.com/MiczFlor/RPi-Jukebox-RFID/issues).

# Upgrade from Version 1.0.0 to 1.1.0

This upgrade brings the web app UI for file management, recursive folder management, wifi switch off and more. The latest [one-line Phoniebox install script](INSTALL-stretch.md#oneLineInstall) contains all the necessary steps, but will treat your upgrade like a new install. Manual upgrade:
~~~
cd
cd RPi-Jukebox-RFID
git fetch
git checkout master
git pull
# settings for php.ini to support upload
# make backup
sudo cp /etc/php/7.0/fpm/php.ini /etc/php/7.0/fpm/php.ini.backup
# replace file
sudo cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/php.ini.stretch-default.sample /etc/php/7.0/fpm/php.ini
sudo chown root:root /etc/php/7.0/fpm/php.ini
sudo chmod 644 /etc/php/7.0/fpm/php.ini
sudo service lighttpd force-reload
sudo service php7.0-fpm restart
~~~

# Upgrade to Version 1.0

As of version 1.0 there is a much simpler install procedure: copy and paste one line into your terminal and hit *enter*. Find out more about the [one-line Phoniebox install script](INSTALL-stretch.md#oneLineInstall).

{'fraction_non_alphanumeric': 0.06496736089524402, 'fraction_numerical': 0.009947155735156978, 'mean_word_length': 4.33665008291874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2172483', 'n_tokens_mistral': 898, 'n_tokens_neox': 866, 'n_words': 465}