Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
- Posts: 30
- Joined: Sat May 29, 2021 11:21 pm
What is the easiest way to start this script (port forwarding) on DietPi by Autostart ?
Code: Select all
ssh -fNT 192.168.8.200 -p 22 \
-L 10.144.xx.xx:yyy:192.168.0.104:yyy \
- Posts: 368
- Joined: Tue Feb 25, 2020 2:54 pm
There used to be
for that, but not anymore. You can try to add a custom cronjob in
. Keep in mind that you also need to specify the user who will run the command.
Alternatively, look at
- Posts: 5996
- Joined: Sat Nov 16, 2019 12:49 am
Or use a
systemd service to start on boot. Or DietPi custom script available as autostart option.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
- Site Admin
- Posts: 3357
- Joined: Sat Nov 18, 2017 6:21 pm
Easiest is probably to put the script into
/var/lib/dietpi/postboot.d. All contained scripts are executed as root user independant of a login once at the end of the boot sequence.