1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2025-04-05 12:03:00 +02:00

Fix lockfile path

This commit is contained in:
aclist 2022-12-03 21:38:27 +09:00
parent 4a3521d711
commit 8cce75c418

View file

@ -215,7 +215,7 @@ freedesktop_dirs(){
#TODO: update url #TODO: update url
curl -s "$version_url" > "$sd_install_path/dzgui.sh" curl -s "$version_url" > "$sd_install_path/dzgui.sh"
chmod +x "$sd_install_path/dzgui.sh" chmod +x "$sd_install_path/dzgui.sh"
img_url="$stable_url/images" img_url="$testing_url/images"
for i in dzgui grid.png hero.png logo.png; do for i in dzgui grid.png hero.png logo.png; do
curl -s "$img_url/$i" > "$sd_install_path/$i" curl -s "$img_url/$i" > "$sd_install_path/$i"
done done
@ -1712,10 +1712,10 @@ while true; do
done done
} }
lock(){ lock(){
if [[ ! -f $config_path/.lockfile ]]; then if [[ ! -f ${config_path}.lockfile ]]; then
touch $config_path/.lockfile touch ${config_path}.lockfile
fi fi
pid=$(cat $config_path/.lockfile) pid=$(cat ${config_path}.lockfile)
ps -p $pid -o pid= >/dev/null 2>&1 ps -p $pid -o pid= >/dev/null 2>&1
res=$? res=$?
if [[ $res -eq 0 ]]; then if [[ $res -eq 0 ]]; then
@ -1725,7 +1725,7 @@ lock(){
elif [[ $pid == $$ ]]; then elif [[ $pid == $$ ]]; then
: :
else else
echo $$ > $config_path/.lockfile echo $$ > ${config_path}.lockfile
fi fi
} }
fetch_helpers(){ fetch_helpers(){