«•» GeoSharing Worlds No.1 Satellite Forum «•»

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

systemd script for Multics by poyo

-=EYEDREAM=-

Administrator
Staff member
Administrator
Joined
Dec 18, 2018
Messages
87
Reaction score
107
Points
33
I wanted to leverage a bit of functionality within systemd, the ability to automatically restart a crashed process

Simply create a new systemd script;

Code:
sudo nano /etc/systemd/system/multics.service

…and add the following content…

Code:
[Unit]
Description=Multics daemon
After=network.target
Requires=network.target

[Service]
Type=forking
ExecStart=/var/bin/multics -b -C /var/etc/multics.cfg
ExecStop=/bin/kill -9 $MAINPID
TimeoutStopSec=1
Restart=always
RestartSec=5
StartLimitInterval=0

[Install]
WantedBy=multi-user.target

you might need to alter the paths

Once you’ve created the service, you need to reload the systemd daemons by issuing;

Code:
sudo systemctl daemon-reload

…then you can simply start the Multics by issuing;
Code:
sudo systemctl start multics

One final thing is to ensure Multics starts on boot, to do that, issue the following command;
Code:
sudo systemctl enable multics.service
You can check Multics is running by visiting the web interface or by running;
Code:
sudo systemctl status multics

If multics crashes it will start again automatically.

And that’s it!

Happy viewing!
 

joyahmed

New member
Registered
Joined
Oct 31, 2019
Messages
9
Reaction score
0
Points
1
i have 2 vps on same vps.multics and multics2.so what change or add will done by me ?
 

foxhd541

New member
Registered
Joined
Nov 15, 2019
Messages
10
Reaction score
0
Points
1
1573882318448.png

i use this but sir this error show why?


sudo nano /etc/systemd/system/multics4.service

[Unit]
Description=Multics4 daemon
After=network.target
Requires=network.target

[Service]
Type=forking
ExecStart=/var/bin/multics4 -b -C /var/etc/multics4.cfg
ExecStop=/bin/kill -9 $MAINPID
TimeoutStopSec=1
Restart=always
RestartSec=5
StartLimitInterval=0

[Install]
WantedBy=multi-user.target


sudo systemctl daemon-reload

sudo systemctl start multics4

sudo systemctl enable multics4.service

sudo systemctl status multics4


after is done i use this
killall -9 multics4
 
Top