small-package/luci-app-systools/root/usr/share/systools/qb_reset_password.run

18 lines
392 B
Bash
Executable File

#!/bin/sh
profile=`uci get qbittorrent.main.profile`
if [ -n "$profile" ]; then
echo "qb profile: $profile"
echo "stop qb"
/etc/init.d/qbittorrent stop
sleep 2
echo "delete password"
sed -i '/^WebUI\\Password_/d' "$profile/qBittorrent/config/qBittorrent.conf"
echo "start qb"
/etc/init.d/qbittorrent start
else
echo "profile not defined!"
fi
echo "done"