-
Notifications
You must be signed in to change notification settings - Fork 0
Systemctl Service
Elian edited this page Sep 8, 2021
·
1 revision
-
Create a new service
sudo nano /etc/systemd/system/ezpanel.service -
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)
-
Save the file (Ctrl+X)
-
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