Start, Stop and Restart other Odoo instances in the server. Just use it.
        
            
            Start, Stop and Restart other
Odoo instances in the server. Just use it.
            
            * Groups created:
            Admin user (Setting servers): To admin servers.
            Normal user (Setting servers): To start, stop, restart and watch status of servers, from User side.
            * Config (init.d scripts, located in config/config.ini):
            [ODOO_SERVERS]
            COMMAND_DIRECTORY = /etc/init.d/odoo_scripts/
            * Admin views:
                Config Servers: To manage the servers.
                Servers Config List: To manage the servers configuration.
                Config Admin Servers: To link servers with servers configuration.
                
            * User views:
                Config User Servers: To manage the user servers (start, stop, restart servers and refresh status).
                
            * To install:
                # Install odoo:
                # https://www.odoo.com/documentation/10.0/setup/install.html
                sudo aptitude install odoo
                # To execute scripts as USER=odoo, example:
                # sudo /etc/init.d/odoo_scripts/odoo start
                # sudo /etc/init.d/odoo_scripts/odoo stop
                # sudo /etc/init.d/odoo_scripts/odoo status
                #GRANT PREMISSIONS TO odoo USER
                # Edit last line of /etc/sudoers:
                odoo ALL=(root) NOPASSWD: /etc/init.d/odoo_scripts/*/
                
                #Link the init script:
                sudo mkdir -p /etc/init.d/odoo_scripts/
                sudo ln -s /etc/init.d/odoo /etc/init.d/odoo_scripts/
                
                #Or you can create folders, that will be grouped by init command sections
                sudo mkdir -p /etc/init.d/odoo_scripts/user_1/
                sudo ln -s /etc/init.d/odoo /etc/init.d/odoo_scripts/user_1/
                # To create another instance of Odoo:
                ODOO_NEW_INSTANCE="odoo-new-instance"
                sudo mkdir -p /etc/init.d/odoo_scripts/
                sudo cp /etc/init.d/odoo /etc/init.d/$ODOO_NEW_INSTANCE
                sudo ln -s /etc/init.d/$ODOO_NEW_INSTANCE /etc/init.d/odoo_scripts/
                #Change header of /etc/init.d/$ODOO_NEW_INSTANCE
                # Provides:          odoo-new-instance
                sudo update-rc.d $ODOO_NEW_INSTANCE defaults >/dev/null
                sudo /etc/init.d/odoo_scripts/$ODOO_NEW_INSTANCE start
                # sudo /etc/init.d/odoo_scripts/$ODOO_NEW_INSTANCE stop
                # sudo /etc/init.d/odoo_scripts/$ODOO_NEW_INSTANCE status
        
 
     
 
							 
							
								This software and associated files (the "Software") may only be
					used
					(executed, modified, executed after modifications) if you have
					purchased a
					valid license from the authors, typically via Odoo Apps,
					or if you
					have
					received a written agreement from the authors of the
					Software (see the
					COPYRIGHT file).
				
				You may develop Odoo modules that use the Software as a library
					(typically
					by depending on it, importing it and using its
					resources), but
					without
					copying any source code or material from the
					Software. You may distribute
					those modules under the license of your
					choice, provided that this
					license
					is compatible with the terms of
					the Odoo Proprietary License (For
					example:
					LGPL, MIT, or proprietary
					licenses similar to this one).
				
				It is forbidden to publish, distribute, sublicense, or sell
					copies of the
					Software or modified copies of the Software.
				
				The above copyright notice and this permission notice must be
					included in
					all copies or substantial portions of the Software.
				
				THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
					EXPRESS OR
					IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
					MERCHANTABILITY,
					FITNESS FOR A PARTICULAR PURPOSE AND
					NONINFRINGEMENT. IN NO EVENT
					SHALL THE
					AUTHORS OR COPYRIGHT HOLDERS
					BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
					LIABILITY, WHETHER IN AN
					ACTION OF CONTRACT, TORT OR OTHERWISE,
					ARISING
					FROM, OUT OF OR IN
					CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
					DEALINGS IN THE
					SOFTWARE.