I am trying to unmount a test example of a perl process for syslog.
1) in a perl script it is already registered in a rotating log file, but I would like to register daemonize for the case when everything goes wrong before log get create 2) Currently I am doing sudo / usr / sbin / daemonize -u User -a -h / home / users / me / log / log.log / home / users / me / test
It already works, but the problem is that the log file will become large, and the only way to process the log file is if daemonize stops.
So, I'm trying to log into syslog, so I do
sudo / usr / sbin / daemonize -u User -a -e / dev / stderr / home / users / me / test | Registrar
When writing to stderr, a permission error will be made. If I do not start as a User, he receives the log in order, but for security reasons I have to start my daemon as a user.
I'm stuck, any help appreciated
my test is sub main {my $ i = 0; for ($ i = 0; $ i <10; $ i ++) {print "this is a test." $ i. "\ n"; }}
primary (@ARG)
Note. I also tried 2> & 1 but did not work.
source
share