Good suggestion and it works. Couldn't make it with systemd however and I'm curious why. It is a GUI application and possibly I made some syntax error. my bap.service file is:
[Unit] Description=Ball and Plate [Service] WorkingDirectory=/opt/bap ExecStart=/opt/bap runbap SyslogIdentifier=bap and my /opt/bap/bap.sh is #! /bin/bash echo "waiting..." sleep 20 echo "changing cpufreq" sudo cpufreq-set -g performance sudo cpufreq-info ./bap The service is installed, but fails on execution. On Friday, September 26, 2014 1:38:02 PM UTC+10, Wulf Man wrote: > > Can't start in in a cron job ? > > > On 9/25/2014 8:20 PM, [email protected] <javascript:> wrote: > > Hi, > > I want to autostart the program on boot on BBB debian. > My executable is located in /opt/bap and I can start it from terminal by > ./bap > Following the instruction from here > http://stackoverflow.com/questions/11152657/angstrom-start-up-processes-beaglebone > > > > the file bap.service in /lib/systemd/system/ has the content: > > [Unit] > Description=ball and plate > After=syslog.target network.target > [Service] > WorkingDirectory=/opt/bap > Type=simple > ExecStart=/opt/bap ./bap > [Install] > WantedBy=multi-user.target > > then I did: > > systemctl enable bap.servicesystemctl start bap.service > All was good, but > debian@beaglebone:/opt/bap$ sudo systemctl status bap.service > bap.service - ball and plate > Loaded: loaded (/lib/systemd/system/bap.service; enabled) > Active: failed (Result: exit-code) since Fri, 26 Sep 2014 03:03:42 > +0000; 4s ago > Process: 6515 ExecStart=/opt/bap ./bap (code=exited, status=203/EXEC) > CGroup: name=systemd:/system/bap.service > > Sep 26 03:03:42 beaglebone (bap)[6515]: Failed at step EXEC spawning > /opt/ba...d > debian@beaglebone:/opt/bap$ > > How to fix it? > > Jan > > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/d/optout. > > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
