Unregistered only when launched from script
Posted: 06 Nov 2018, 17:15
Hi,
I have a working license.
Registered to the root user.
I have setup a Systemd unit file and a script triggering on file changes.
Systemd Unit
Script:
Sadly, when run from systemd as root user, Filebot results UNREGISTERED.
The process is ran as root so I can't understand why is UNREGISTERED only when run from script.
Thanks in advance
I have a working license.
Registered to the root user.
Code: Select all
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Unable to load library 'mediainfo': Native library (linux-x86-64/libmediainfo.so) not found in resource path (/usr/share/filebot/jar/filebot.jar)
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-10-05 (r536)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 2 Core / 1 GB Max Memory / 35 MB Used Memory
OS: Linux (amd64)
HW: Linux iterprohp 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
DATA: /root/.filebot
Package: DEB
License: FileBot License P4309082 (Valid-Until: 2019-08-18)
Done ヾ(@⌒ー⌒@)ノ
Systemd Unit
Code: Select all
[Unit]
Description=Filebot movie service
After=network.target
[Service]
Type=simple
PIDFile=/run/filebot_movie.pid
ExecStart=/bin/sh -c /srvData/repo/filebotJobs/movie.sh
ExecStop=/bin/kill -9 $MAINPID
TimeoutStopSec=60
StandardOutput=file:/srvData/repo/filebotJobs/movieExecution.log
StandardError=file:/srvData/repo/filebotJobs/movieError.log
[Install]
WantedBy=multi-user.target
Code: Select all
#!/bin/sh
SETTLE_DOWN_TIME=60
export HOME=/root/.filebot
inotifywait -m /srvData/repo/torrent/downloads/completed/movies -e create -e moved_to -e modify --exclude '/[.@]' --format '%w%f' $INOTIFYWAIT_OPTS | stdbuf -oL uniq | while read -r FILE; do
# file may yield inode/x-empty for new files
sleep "$SETTLE_DOWN_TIME"
# abort if the file has been modified while we were asleep
if [ `find "$FILE" -type f -newermt "$SETTLE_DOWN_TIME seconds ago" -print -quit` ]; then
echo "Modified: $FILE"
continue
fi
# e.g. video.mp4: video/mp4
if file --mime-type "$FILE" | egrep "directory|video|audio|empty|octet-stream"; then
filebot -script fn:amc --action hardlink --conflict auto --output /srvData/repo/plex -non-strict /srvData/repo/torrent/downloads/completed/movies --log-file /srvData/repo/filebotJobs/movie_amc.log --def excludeList="/srvData/repo/filebotJobs/.movieexcludes" --def movieFormat="movie/{n} ({y})/{n} ({y}){' CD'+pi}{'.'+lang}" --def skipExtract=y --def ut_label=movie --def subtitles=en
fi
done
The process is ran as root so I can't understand why is UNREGISTERED only when run from script.
Thanks in advance