fix: update install script to replace service file with init file

This commit is contained in:
SunBK201 2024-11-06 22:48:16 +08:00
parent fb0d56db68
commit 8d28b57ab6
2 changed files with 6 additions and 6 deletions

View File

@ -58,19 +58,19 @@ tar zxf $ua3f_tar && rm -f $ua3f_tar
mv ua3f /usr/bin/ua3f
chmod +x /usr/bin/ua3f
if [ -f "/etc/init.d/ua3f.service" ]; then
rm "/etc/init.d/ua3f.service"
if [ -f "/etc/init.d/ua3f.init" ]; then
rm "/etc/init.d/ua3f.init"
fi
if [ -f "/etc/init.d/ua3f" ]; then
rm "/etc/init.d/ua3f"
fi
wget https://blog.sunbk201.site/cdn/ua3f.service
wget https://blog.sunbk201.site/cdn/ua3f.init
if [ $? -ne 0 ]; then
echo "Download ua3f.service Failed, Please Retry."
echo "Download ua3f.init Failed, Please Retry."
exit 1
fi
mv ua3f.service /etc/init.d/ua3f && chmod +x /etc/init.d/ua3f
/etc/init.d/ua3f.service enable
mv ua3f.init /etc/init.d/ua3f && chmod +x /etc/init.d/ua3f
/etc/init.d/ua3f enable
wget https://blog.sunbk201.site/cdn/ua3f.uci
if [ $? -ne 0 ]; then