blob: fc09116bc455f5acfa844531d460197f9ca941ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/bash
home=$HOME
if [ $UID -eq 0 ];then
home=/root;
fi
dir=$home/.config/aria2;
session=$dir/session.lock;
config=$dir/aria2.conf;
#create dir
if [ ! -d $dir ];then
mkdir -p $dir;
fi
#create session
if [ ! -f $session ];then
touch $session;
fi
#create config
if [ ! -f $config ];then
cp /etc/aria2/aria2.conf.example $config;
fi
exec /usr/bin/aria2c --conf-path=$config;
|