
Originally Posted by
nickrout
I assume you mean the user which runs mythfrontend when you say "user1"
Correct - the system owner's username.
I have tried both of these variations, and the script still doesn't run.
Code:
#!/bin/sh
touch /var/log/cron/before-mythlink-line
su - user1 /usr/bin/mythlink.pl --link /var/lib/mythtv/pretty --verbose --format "%T - %S - %Y-%m-%d, %g-%i %A"
touch /var/log/cron/after-mythlink-line
Code:
#!/bin/sh
touch /var/log/cron/before-mythlink-line
su - mythtv /usr/bin/mythlink.pl --link /var/lib/mythtv/pretty --verbose --format "%T - %S - %Y-%m-%d, %g-%i %A"
touch /var/log/cron/after-mythlink-line
I just tried this from a command prompt and it didn't work - looks like a syntax error with the su command?
Code:
user1@Mythbuntu:/var/log/cron$ su - mythtv /usr/bin/mythlink.pl --link /var/lib/mythtv/pretty --verbose --format "%T - %S - %Y-%m-%d, %g-%i %A"
su: unrecognized option '--link'
Usage: su [options] [LOGIN]
Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and
keep the same shell
-s, --shell SHELL use SHELL instead of the default in passwd
Bookmarks