This &> /dev/null & disown %-
makes the parent process/script not wait for it to finish.
my-script.sh "$@" &> /dev/null & disown %-
count=0 ; for i in *.jpg; do count="$(($count +1))"; mv "$i" $(printf "spelkamer_%02d.jpg" $count); done
Use an exclamation mark as -resize 800x600!
to make it scale to 800x600 pixels and not use its original ratio.
for i in *.jpg; do convert -resize 800x533 "$i" -quality 80% "small/${i}" ; done
sudo /bin/su -c "cat << 'EOF' > /etc/init.d/my-script
EOF