TheSerapher/php-mpos — pull request #1464 by raistlinthewiz (2014-01-18 12:49:47+00:00)
Title: Pid file fix proposal for multi-pool setups

Although there exists subfolder support for multi-pool setups, this will not work out of box.

```
# Subfolder for PIDFILE, so it's path will be unique in a multipool server.
# Path relative to BASEPATH.
# Eg. SUBFOLDER="LTC"
SUBFOLDER=""
```

The problem is that for each merge, operator has to reset the subfolder value back..

Basically lt's say operator runs 3 diff. coin pools;
```
/a
/b
/c
```

So he decided to get latest changes from php-mpos; then he has to issue the following commands;

```
cd /a
git pull
```
Git will warn about modified /a/cronjobs/run-*.sh files
At this point he needs to checkout head versions from repository where the downloaded one will just have SUBFOLDER=""
```
git checkout /a/cronjobs/run-crons.sh
git checkout /a/cronjobs/run-maintenance.sh
git checkout /a/cronjobs/run-payout.sh
git checkout /a/cronjobs/run-statistics.sh
```
He can now get the latest changes merged;
```
git pull
```
Now he has to edit the 4 run-*.sh files and set the SUBFOLDER value correctly again.
```
pico /a/cronjobs/run-maintenance.sh
pico /a/cronjobs/run-payout.sh
pico /a/cronjobs/run-statistics.sh
```

So now he has to do the same stuff for /b and /c pools to. If has even more pools, he has to repeat more.

So I've a proposal that works out-of-the box;

Instead of storing the cron pid files in /tmp and require operators to set a SUBFOLDER value each time, let's keep the pid's in /cronjobs/pid/ folder so each php-mpos instance can just store it's own pid's in his own space. No need to checkout, merge, re-edit everytime.