OSCam Startup Script for Ubuntu and other linux distros (systemd compatible)

Updated on 14.05.2017

Create a file called /etc/init.d/oscam with the following contents:

This assumes that you have the oscam binary located in /usr/local/bin/oscam. Remember you have to create this file as the root user.

To “enable” the script and the starting up of oscam on reboot, use the following commands on Ubuntu/Debian:

systemd compatibility

The script will also work on systemd systems (like Ubuntu 16.04 and so on).

To force systemd to detect the service, you have to do:

To enable the system to start at boot:

crontab checks

Furthermore, for a simple crontab script to check if oscam has crashed and didn’t restart by itself, let’s create a file and call it /usr/local/bin/oscamchk:

And let’s make this run every minute:
Once the crontab editor has started, add the following line: