How can I have multiple profiles (3 users so 3 ini files) start at boot in Ubuntu 12.04?
I know I can start a specific profile by doing sabnzbdplus --config-file /home/user/.sabnzbd/sabnzbd.ini but I'd like to start three of those. In /etc/default/sabnzbdplus I can enter only one profile.
How to start multiple profiles at boot
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: How to start multiple profiles at boot
Multiple instances of the service, each with their own config:
- Create copies of both /etc/init.d/sabnzbdplus and /etc/default/sabnzbdplus in their respective directories; i.e. /etc/init.d/sabnzbdplus2 and /etc/default/sabnzbdplus2.
- Edit the copied init script in /etc/init.d/sabnzbdplus2 so that the SETTINGS var points to the copy of the settings file in /etc/default/sabnzbdplus2. Don't make any other changes.
- Set a different user and preferably also hardcode a different port in /etc/default/sabnzbdplus2.
- Hook up the new service:
Code: Select all
sudo update-rc.d sabnzbdplus2 defaults 98 02
- Repeat for sabnzbdplus3, 4, ...
Re: How to start multiple profiles at boot
Almost forgot, there's also the pid file name... var PIDFILE. Maybe I should just make this stuff dynamic, so additional services could symlink.