robingruyters

New Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by robingruyters

  1. Found the solution. Synology wants you to use a defined user for your apps.

    The following needs to be changed for the next release of btsync for NAS.

    --- postinst	2016-03-18 20:43:19.572117411 +0100
    +++ /tmp/postinst	2016-03-18 20:43:10.640752347 +0100
    @@ -1,3 +1,13 @@
     #!/bin/sh
     . `dirname $0`/installer
     `basename $0` > $SYNOPKG_TEMP_LOGFILE
    +
    +synouser --get btsync
    +if [ $? -ne 0 ]
    +then
    +    # create user with random password
    +	synouser --add btsync `uuidgen | cut -c-8` 'Bittorrent Sync User' 0 '' ''
    +else
    +    synouser --modify plex 'Bittorrent Sync User' 0 ''
    +fi
    +
    
    --- start-stop-status	2016-03-18 20:45:26.515055527 +0100
    +++ /tmp/start-stop-status	2016-03-18 20:45:09.832249852 +0100
    @@ -14,8 +14,8 @@
     
     start_daemon ()
     {
    -    chown -R admin:administrators $INSTALL_DIR/var
    -    su - admin -c "umask 000; PATH=${PATH} ${BTSYNC} --config ${CFG_FILE}"
    +    chown -R btsync:administrators $INSTALL_DIR/var
    +    su - btsync -c "umask 000; PATH=${PATH} ${BTSYNC} --config ${CFG_FILE}"
     }
     
     stop_daemon ()
    

    Oh and need to make sure if it is an upgrade that the BtSync folder needs to change owner as well.