Git Product home page Git Product logo

synology-znc-autostart's Introduction

synology-znc-autostart

Script which ensures ZNC is started during Synology DiskStation boot procedure.

Problem

After installation of ZNC package from SynoCommunity on DSM (>= 6). ZNC will fail to start from "Package Center" due to "Failed to run the package service" error.. And

To resolve this problem you need to manually run ZNC binary by SSH-ing to your Synology and running:

/var/packages/znc/scripts/start-stop-status start

as root user.

However, problem with this is that every time your Synology is restarted to update or any other reason, you'll have to remember to manually SSH and run the ZNC binary, or run it via "Package Center". Needless to say, by default updates are scheduled to run in middle of night ...

Solution

Place znc_autostart.sh script under admin user home dir (/var/services/homes/admin)

In "Task Scheduler" of "Control Center":

  • create "Triggered Task > User-defined script"

Triggered Task > User-defined script

  • with following settings for:

General Settings:

General Settings

Task Settings:

Task Settings

With this setup, you don't have to think about manually starting ZNC anymore. Every time your DiskStation is restarted, znc_autostart.sh will make sure ZNC is started during boot procedure.

Technical

When run, znc_autostart.sh will check if there are any ZNC processes running. If there aren't any ZNC related processes running, it will run the ZNC binary.

synology-znc-autostart's People

Contributors

adnanhodzic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

laurentfough

synology-znc-autostart's Issues

ZNC start script fix

Hi,

I had to change the start script in the following way:

/var/packages/znc/scripts/start-stop-status:

# Originally:
#su ${USER} -c "${ZNC} -d ${INSTALL_DIR}/var"

# Now:
sudo -u ${USER} -EH -i -- sh -c "${ZNC} -d ${INSTALL_DIR}/var"

Su didn't work for me as znc user was not in /etc/shadow, I've always got permission denied. Maybe this could be stated in the README.

This actually fixes a problem with starting ZNC from Synology.

Thanks!

Solution

Another solution is just to run

sudo su
/var/packages/znc/scripts/start-stop-status start

And let it create the .pem file. Then you can stop it and start it from the Synology Web UI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.