MultiCS Forum & Oscam & CCcam

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!

Multics Script Systemd service for multics & scheduled restart of multics

hasisar7

New member
Here is how to automatically restart a crashed multics process with systemd. (tested on ubuntu & debian)

- create a new systemd service
Code:
sudo nano /etc/systemd/system/multics.service

- 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

- modify this line that matches your paths & bin & config name:
Code:
ExecStart=/var/bin/multics -b -C /var/etc/multics.cfg

- once you’ve created the service, you need to reload the systemd daemons by issuing
Code:
sudo systemctl daemon-reload

- start the multics by issuing
Code:
sudo systemctl start multics

- to ensure multics starts on boot, to do that, issue the following command
Code:
sudo systemctl enable multics.service

- to check multics is running by running the following command
Code:
sudo systemctl status multics

If multics crashes it will start again automatically.

--

If you want to reboot a multics (service) than you can create a cron job

- add a cron job by editing crontab with following command
Code:
sudo nano /etc/crontab

- let's say You want to restart multics at 3 AM every day, than add the following line:
Code:
00 03 * * * root systemctl restart multics

or
Code:
00 03 * * * root service multics restart

or
Code:
00 03 * * * root killall -9 multics

- after editing and saving then you need to restart the crontab with:
Code:
sudo service cron restart

That it's.

Now You have auto restart of multics proces after crash and reboot of multics at 3 AM at your VPS.
 

multicsi84639

Administrator
Staff member
Here is how to automatically restart a crashed multics process with systemd. (tested on ubuntu & debian)

- create a new systemd service
Code:
sudo nano /etc/systemd/system/multics.service

- 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

- modify this line that matches your paths & bin & config name:
Code:
ExecStart=/var/bin/multics -b -C /var/etc/multics.cfg

- once you’ve created the service, you need to reload the systemd daemons by issuing
Code:
sudo systemctl daemon-reload

- start the multics by issuing
Code:
sudo systemctl start multics

- per garantire che multics si avvii all'avvio, per farlo, emettere il seguente comando
Code:
sudo systemctl abilita multics.service

- per verificare che multics sia in esecuzione eseguendo il comando seguente
Code:
sudo systemctl status multics

Se multics si arresta in modo anomalo, si riavvierà automaticamente.

--

Se vuoi riavviare un multics (servizio) puoi creare un cron job

- aggiungi un cron job modificando crontab con il seguente comando
[CODICE]sudo nano /etc/crontab[/CODICE]

- supponiamo che tu voglia riavviare multics ogni giorno alle 3 del mattino, quindi aggiungi la seguente riga:
Code:
00 03 * * * root systemctl restart multics

o
Code:
00 03 * * * riavvio multics del servizio root

o
Code:
00 03 * * * root killall -9 multics

- dopo aver modificato e salvato è necessario riavviare il crontab con:
Code:
sudo service cron restart

Quello è.

Ora hai il riavvio automatico del processo multics dopo l'arresto anomalo e il riavvio di multics alle 3 del mattino sul tuo VPS.
Perfect, thanx
 
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock    No Thanks