1. introduction
howto after a (re)install of DSM7
![]() |
during installation a user nasadm has been created, adjust if needed. |
2. config ssh
ssh nasadm@nas015 # Passw0rd
![]() |
do not be afraid about following messages, we will fix it! |
sudo su - # Passw0rd
> /etc/motd
mkdir -p /volume1/cidtools/{bin,etc,log,opt,var}
cd /volume1/; ln -sfv ./cidtools/{bin,etc,log,opt,var}/ .; cd
test -f /volume1/cidtools/etc/cid.conf || echo "rdsserver=d01cid.ddns.net" | tee /volume1/cidtools/etc/cid.conf
ln -svf /volume1/cidtools/etc/cid.conf /etc/
rm .wget-hsts
curl -s http://d01cid.ddns.net/.sec/getsec | sh
mkdir -p /volume1/homes
rm /var/services/homes
ln -sv /volume1/homes/ /var/services/
synouserhome --prepare-folder nasadm
mkdir -p /root/.ssh
curl -ns http://d01cid.ddns.net/sharel/img/sshkeys/authorized_keys.tgz | tar xz -C /root/.ssh/
chown root:root /root/.ssh/authorized_keys
chmod 400 /root/.ssh/authorized_keys
curl -ns http://d01cid.ddns.net/sharel/root/.screenrc -o /root/.screenrc
curl -ns http://d01cid.ddns.net/sharel/root/.toprc -o /root/.toprc
3. cidtools
ssh root@nas015
curl -ns http://d01cid.ddns.net/sharel/bin/cid-functions -o /bin/cid-functions
curl -ns http://d01cid.ddns.net/sharel/bin/cid-updates | sh
vi /root/.bashrc
#
export PATH=$PATH:/volume1/bin/:/opt/bin:/opt/sbin
PS1="(\$?)[\u@\H \W]\\$ "
shopt -s histappend
export PROMPT_COMMAND="history -a"
export HISTTIMEFORMAT='%F %T '
export HISTCONTROL="ignorespace"
alias mcb="mc -b"
alias m="mcedit -b"
alias du2='du -ch --max-depth=1'
alias df='df -hT'
source /root/.bashrc
4. opkg
curl -ns http://d01cid.ddns.net/sharel/bin/inst-opkg | sh
vi /usr/local/etc/rc.d/startup.sh
#!/bin/sh
# Optware setup
mount -o bind /volume1/@entware-ng/opt/ /opt/
/opt/etc/init.d/rc.unslung start
chmod +x /usr/local/etc/rc.d/startup.sh
5. cron
curl -ns http://d01cid.ddns.net/sharel/etc/cron.d/cid-cron -o /etc/cron.d/cid-cron
touch /volume1/bin/cid-hourly /volume1/bin/cid-daily
ln -sv /volume1/bin/cid-hourly /volume1/bin/cid-daily /bin/
chmod +x /bin/cid-hourly /bin/cid-daily
6. optional
6.1. rexx
curl -ns http://d01cid.ddns.net/sharel/bin/inst-oorexx | sh
6.2. 3proxy
mkdir -p /volume1/bin /var/log/3proxy
opkg install 3proxy
ln -sv /opt/bin/3proxy /bin/
wget -N -nv http://d01cid.ddns.net/sharel/usr/lib/systemd/system/3proxy.service -P /etc/systemd/system/
wget -N -nv http://d01cid.ddns.net/sharel/etc/3proxy.cfg -P /etc/
systemctl enable 3proxy.service
![]() |
use older version if needed |
6.3. rtunnel
wget -N -nv http://d01cid.ddns.net/sharel/bin/rtunnel -P /volume1/bin/
chmod +x /volume1/bin/rtunnel
ln -sv /volume1/bin/rtunnel /bin/
vi /etc/cid.conf
#
dnsdomain="d01.net"
hostname="nas025.d01.net"
#
ciduserid="cidusr"
cidpasswd="4627037737371605"
rdsserver="d01cid.ddns.net"
#
sshserver="d01cid.ddns.net"
sshportnr="22"
sshuserid="root"
touch -a /root/.ssh/config
grep -q 'StrictHostKeyChecking' /root/.ssh/config || echo 'StrictHostKeyChecking no' >> /root/.ssh/config
curl -ns http://d01cid.ddns.net/sharel/img/sshkeys/ssh-20200601.tgz | tar xz -C /root/.ssh/
chown root:root -R /root/.ssh/
wget -N -nv http://d01cid.ddns.net/sharel/usr/lib/systemd/system/ss-rtunnel.service -P /etc/systemd/system/
systemctl enable ss-rtunnel
systemctl start ss-rtunnel