mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed Linux install script for some distros.
This commit is contained in:
parent
f70b3249a5
commit
5594fed442
2 changed files with 14 additions and 3 deletions
|
@ -122,8 +122,19 @@ DownloadAgent() {
|
|||
UpdateMshFile
|
||||
if [ $starttype -eq 1 ]
|
||||
then
|
||||
# systemd
|
||||
echo -e "[Unit]\nDescription=MeshCentral Agent\n[Service]\nExecStart=/usr/local/mesh/meshagent\nStandardOutput=null\nRestart=always\nRestartSec=3\n[Install]\nWantedBy=multi-user.target\nAlias=meshagent.service\n" > /lib/systemd/system/meshagent.service
|
||||
# systemd
|
||||
if [ -d "/lib/systemd/system/" ]
|
||||
then
|
||||
echo -e "[Unit]\nDescription=MeshCentral Agent\n[Service]\nExecStart=/usr/local/mesh/meshagent\nStandardOutput=null\nRestart=always\nRestartSec=3\n[Install]\nWantedBy=multi-user.target\nAlias=meshagent.service\n" > /lib/systemd/system/meshagent.service
|
||||
else
|
||||
# Some distros have the systemd folder at a different place
|
||||
if [ -d "/usr/lib/systemd/system/" ]
|
||||
then
|
||||
echo -e "[Unit]\nDescription=MeshCentral Agent\n[Service]\nExecStart=/usr/local/mesh/meshagent\nStandardOutput=null\nRestart=always\nRestartSec=3\n[Install]\nWantedBy=multi-user.target\nAlias=meshagent.service\n" > /usr/lib/systemd/system/meshagent.service
|
||||
else
|
||||
echo "Unable to find systemd folder."
|
||||
fi
|
||||
fi
|
||||
systemctl enable meshagent
|
||||
systemctl start meshagent
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue