imperia Server Autostart
Of course you can also start the internal imperia web server manually with site/bin/site_imperia.pl
or for newer versions with imperia serve
. However, it is better to automate this.
With conventional start-stop scripts you simply copy an existing script from /etc/init.d
, adapt it accordingly, and make sure that it is started automatically in the default runlevel. With systemd
, you create a service, for example imperia.service
, under this path:
/etc/systemd/system/imperia.service
This is how you tell the service that the imperia internal web server should start automatically:
Unit
Description=imperia Server
Service
Type=simple
ExecStart=/var/www/imperia/dev/site/bin/site_imperia.pl -i -t Net::Server::PreFork
User=nginx
Install
WantedBy=multi-user.target
Now the service has to be activated:
sudo systemctl enable imperia.service
You can then enter the service in the default services so that the internal web server - just like nginx - automatically starts when the system is booted:
sudo systemctl add imperia
sudo systemctl has started imperia. It is entered in the default services with sudo systemctl add imperia
so that it starts automatically when booting. And that's it. The imperia development server is now available via http://www.example.com:2304/imp/
.