Managing cron entries in syslog

Published on Author adventurerLeave a comment

In the latest Raspbian distributions the default syslog configuration writes cron messages, including success messages, in to /var/log/syslog. To eliminate this, edit /etc/rsyslog.conf % sudo vi /etc/rsyslog.conf uncomment the line for /var/log/cron.log, and add cron as an exclusion to /var/log/syslog as follows: cron,* /var/log/cron *.*, cron,auth,authpriv.none /var/log/syslog and then force a restart of syslog using… Continue reading Managing cron entries in syslog

RaspberryPi: Running a Python script on boot

Published on Author adventurerLeave a comment

To run a script called myproject/myscript.py on boot, first create the script and ensure it has execute permissions. Then create a config file for systemctl as follows: % sudo vi /lib/systemd/system/myscript.service containing the following [Unit] Description=My Script After=multi-user.target [Service] Type=idle ExecStart=/usr/bin/python /home/pi/myproject/myscript.py [Install] WantedBy=multi-user.target Set the correct permissions on the config file % sudo chmod… Continue reading RaspberryPi: Running a Python script on boot