systemctl commands

May 11, 09:46 AM

Various systemctl commands

axllent guide

## 2016-09-19 – ipcrm/ipcs is some sort of interprocess thread connections used by systemctl
for i in `ipcs -s | grep apache | awk ‘{print $2}’` ;
do ipcrm -s $i;
done;

systemctl ; ## show all running processes
systmectl | grep postfix ; ## only show postfix

????? Unit pm2-init.service could not be found. ?????????????? – 2022-09-28 ?????????
systemctl enable pm2-init.service ; ## enable process

systemctl start pm2-init.service ; ## start process
systemctl stop pm2-init.service ; ## stop process
systemctl status pm2-init.service ; ## STATUS !
systemctl kill pm2-init.service ; ## kill process

systemctl disable pm2-init.service ; ## disable process
systemctl reset-failed ; ## after disable;

systemctl mask (??)

you need this file /etc/systemd/system/voiceSpiceNode.service:

[Unit]
Description= voice Spice Server
#Requires=After=mysql.service # Requires the mysql service to run first

[Service]
Environment=“PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/”
Environment=“LIBPATH=/usr/local/lib/”
Environment=“LD_LIBRARY_PATH=/usr/local/lib/”
ExecStart=/usr/local/bin/node /home/comptonpeslonline.com/public_html//voiceSpiceNode/voiceSpiceNodeServer/voiceSpiceNodeServer.js —port 8000
Restart=always
RestartSec=10 # Restart service after 10 seconds if node service crashes
#StandardOutput=syslog # Output to syslog
StandardOutput=/var/log/mark/node/voiceSpiceNode.js.log
StandardError=/var/log/mark/node/voiceSpiceNode.js.err.log
SyslogIdentifier=voiceSpiceNode
User=comptonpeslonline.com
#Group=
Environment=NODE_ENV=production PORT=8000

[Install]
WantedBy=multi-user.target

=====================
##2015-07-01 – added for centOS7 to block/remove the new firewall firewalld (per interserver)

systemctl stop firewalld
systemctl mask firewalld
yum -y install iptables-services
systemctl enable iptables
systemctl stop iptables

Mark Edwards

,

---

Commenting is closed for this article.

---