LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-09-2017, 12:35 PM   #1
shams
Member
 
Registered: Jan 2004
Posts: 535

Rep: Reputation: 30
script not working to start aria2c daemon?


Hi,
I want to start the aria2c daemon when the ubuntu 16.10 boot, i got this /etc/init.d/aria2 script from the internet, when i run the script says:
Code:
Starting aria2 daemon
but cannot start the aria2c daemon.
This is /etc/init.d/aria2 script:
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: aria2
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: aria2c init script.
# Description: Starts and stops aria2 daemon.
### END INIT INFO

USER="root"
DAEMON=/usr/bin/aria2c
CONF=/etc/aria2/aria2.conf

start() {
if [ -f $CONF ]; then
echo "Starting aria2 daemon"
start-stop-daemon -S -c $USER -x $DAEMON -- -D --enable-rpc --conf-path=$CONF
else
echo "Couldn't start aria2 daemon for $USER (no $CONF found)"
fi
}

stop() {
start-stop-daemon -o -c $USER -K -u $USER -x $DAEMON
}

status() {
dbpid=`pgrep -fu $USER $DAEMON`
if [ -z "$dbpid" ]; then
echo "aria2c daemon for USER $btsuser: not running."
else
echo "aria2c daemon for USER $btsuser: running (pid $dbpid)"
fi
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload|force-reload)
stop
start
;;
status)
status
;;
*)
echo "Usage: /etc/init.d/aria2 {start|stop|reload|force-reload|restart|status}"
exit 1
esac

exit 0
this is /etc/aria2/aria2.conf:
Code:
daemon=true
continue
dir=/home/user/Downloads
file-allocation=falloc
log-level=warn
check-certificate=false
max-connection-per-server=8
summary-interval=120
max-concurrent-downloads=3
enable-dht=false
http-auth-challenge=true
save-session=/homr/user/.aria2/aria.save
input-file=/home/user/.aria2/input.conf
log=/var/log/aria2/aria.log
max-overall-download-limit=0
min-split-size=5M
enable-http-pipelining=true
enable-rpc=true
rpc-listen-all=true
# rpc-user=rpcuser
# rpc-passwd=rpcpass
listen-port=6800
# dht-listen-port=6800
seed-ratio=1.0
max-overall-upload-limit=5k
max-upload-limit=2K
ftp-pasv=true
file-allocation=none
# on-download-complete=exit
disable-ipv6=true
disk-cache=25M
timeout=600
retry-wait=30
max-tries=50
 
Old 04-11-2017, 02:13 AM   #2
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,790

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
Something in the logfile /var/log/aria2/aria.log?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to write script to start daemon BW-userx Slackware 5 10-13-2016 07:01 AM
Whats the proper what to terminate a script using start-stop-daemon? dodul Linux - General 1 07-17-2015 10:09 AM
Suse init script: start daemon as different user. possible? BrianK SUSE / openSUSE 1 02-28-2011 02:34 PM
Bash script to verify the daemon is working if not, start the daemon kishoreru Linux - Newbie 7 09-23-2009 04:29 AM
start a daemon script at startup haxxor23 Linux - Newbie 2 05-12-2007 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration