Should be simple?

Come up with a useful post-processing script? Share it here!
LakersFan
Newbie
Newbie
Posts: 18
Joined: August 12th, 2013, 11:54 pm

Re: Should be simple?

Post by LakersFan »

To confirm, I tried it a second time. Then typed cat /tmp/db-sync.log in a terminal and again it only showed the one entry at 22:07:40

User avatar
OneCD
Sr. Member
Sr. Member
Posts: 349
Joined: March 4th, 2017, 3:47 pm

Re: Should be simple?

Post by OneCD »

Seems the script aborted without recording anything to file.

Let's try a slight modification:

Code: Select all

#!/usr/bin/env bash
#/usr/sbin/rclone sync /mnt/user/stern dropbox:misc
{
	echo "date: $(date)"
	echo "PATH: $PATH"
	echo "EUID: $EUID"
	echo "which: $(which rclone)"
	echo "check direntry: $(ls -l /usr/sbin/nologin)"
	echo "rclone direntry: $(ls -l /usr/sbin/rclone)"
	echo
} >> /tmp/db-sync.log 2>&1
Stuff I like: Apache BASH CRON DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo S20 pfSense Python Raspberry Pi RAID SABnzbd SickChill Transmission Usenet VirtualBox Watcher3 XFCE

LakersFan
Newbie
Newbie
Posts: 18
Joined: August 12th, 2013, 11:54 pm

Re: Should be simple?

Post by LakersFan »

Ok(!)(?)
I ran it manually and got this:

Code: Select all

[email protected]:~# /mnt/cache/apps/binhex-sabnzbdvpn/scripts/dropbox_sync.sh
[email protected]:~# cat /tmp/db-sync.log
date: Fri Apr 12 22:07:40 PDT 2019
PATH: .:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
EUID: 0
which: /usr/sbin/rclone
check direntry: ls: cannot access '/usr/sbin/nologin': No such file or directory
rclone direntry: -rwxr-xr-x 1 root root 495 Apr  7 15:04 /usr/sbin/rclone

date: Fri Apr 12 22:36:09 PDT 2019
PATH: .:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
EUID: 0
which: /usr/sbin/rclone
ls: cannot access '/usr/sbin/nologin': No such file or directory
check direntry:
rclone direntry: -rwxr-xr-x 1 root root 495 Apr  7 15:04 /usr/sbin/rclone
I then ran it as a post-processing script in SAB and it ran without error.
But when going back to the terminal and typing cat /tmp/db-sync.log, then was no new entry indicating it ran.

User avatar
OneCD
Sr. Member
Sr. Member
Posts: 349
Joined: March 4th, 2017, 3:47 pm

Re: Should be simple?

Post by OneCD »

Sorry, have to admit, I don't understand why it's working that way. I've not used your specific OS (Unraid) myself.

Is your SABnzbd running in a container or some other sandboxed environment?
Stuff I like: Apache BASH CRON DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo S20 pfSense Python Raspberry Pi RAID SABnzbd SickChill Transmission Usenet VirtualBox Watcher3 XFCE

LakersFan
Newbie
Newbie
Posts: 18
Joined: August 12th, 2013, 11:54 pm

Re: Should be simple?

Post by LakersFan »

It is running in a docker container.

User avatar
OneCD
Sr. Member
Sr. Member
Posts: 349
Joined: March 4th, 2017, 3:47 pm

Re: Should be simple?

Post by OneCD »

Ah, that explains it. ;D

Sorry, I’m unable to assist with Docker images. Maybe someone else can suggest a fix?
Stuff I like: Apache BASH CRON DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo S20 pfSense Python Raspberry Pi RAID SABnzbd SickChill Transmission Usenet VirtualBox Watcher3 XFCE

LakersFan
Newbie
Newbie
Posts: 18
Joined: August 12th, 2013, 11:54 pm

Re: Should be simple?

Post by LakersFan »

Damn, we were so close. lol
I cannot thank you enough for the help you've given me to this point. I'm sorry I didn't notify you up front of that. I'm (clearly) new to this and I guess I didn't even consider it would be a big deal.

Thanks again bro. I owe you a beer.

User avatar
OneCD
Sr. Member
Sr. Member
Posts: 349
Joined: March 4th, 2017, 3:47 pm

Re: Should be simple?

Post by OneCD »

No worries, hope you get it figured out.
Stuff I like: Apache BASH CRON DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo S20 pfSense Python Raspberry Pi RAID SABnzbd SickChill Transmission Usenet VirtualBox Watcher3 XFCE

Post Reply