Mathics as a service

31 views
Skip to first unread message

Isaías Soares

unread,
Oct 5, 2022, 2:18:37 PM10/5/22
to mathics-users
Hi!

I've created a mathics.service file, to run mathicsserver script as a system service. Here is the code (and explanations):

## Mathics start/stop/restart service script
## Author: Isaias José Amaral Soares
## Note: You can redistribute and alter this as your needs
## Steps to be followed to use this script:
## 1. Copy mathics.service to /usr/lib/systemd/system/
## 2. Reload the daemons of systemctl: systemctl daemon-reload
## 3. Start the script:     systemctl start mathics.service
##                      or: systemctl restart mathics.service

[Unit]
Description=Mathics Server Service

[Service]
Type=simple
User=root
Group=root
ExecStart=nohup /usr/local/bin/mathicsserver&
Restart=
WorkingDirectory=/tmp
Nice=19
LimitNOFILE=16384

[Install]
WantedBy=multi-user.target

Mauricio Matera

unread,
Oct 6, 2022, 3:16:11 PM10/6/22
to mathics-users
Maybe it would be a good idea to avoid setting the root account as the user. Remember that Mathics allows you to run any command using `Run[cmd]`, which is potentially dangerous.

M
Reply all
Reply to author
Forward
0 new messages