Skip to content

Systemctl Service

Elian edited this page Sep 8, 2021 · 1 revision

Systemctl Service Setup

  1. Create a new service

     sudo nano /etc/systemd/system/ezpanel.service
    
  2. Paste the code at the end into the editor (make sure to replace the ezPanelDaemon.jar to wherever you installed it, as well as the MySQL credentials)

  3. Save the file (Ctrl+X)

  4. Reload systemctl

     sudo systemctl daemon-reload
    

Service file code:

[Unit]
Description=ezPanel Daemon Service
After=syslog.target network.target

[Service]
SuccessExitStatus=143

User=root
Group=root

Type=simple

WorkingDirectory=/opt/ezPanel
ExecStart=/bin/java -jar /opt/ezPanel/ezPanelDaemon.jar 127.0.0.1 ezpanel [created user] [password]
ExecStop=/bin/kill -15 $MAINPID

[Install]
WantedBy=multi-user.target

Clone this wiki locally