Swayは起動時にスクリプトを実行しません。

Swayは起動時にスクリプトを実行しません。

起動時に実行したい2つのbashスクリプトがあります。私はswayを使ってスクリプトを実行しています。実装する同じ言葉

exec /home/crawraps/.config/sway/gdrive-push-sync.sh
exec /home/crawraps/.config/sway/gdrive-pull-sync.sh

問題は、これらのスクリプトの1つは実行中ですが、もう1つは実行されていないことです。特にgdrive-push-sync.sh動作しません。すべて実行可能で、手動で実行すると機能します。

スクリプトを手動でテストしましたが、スクリプトは実行中ですがスクリプトがないpushこともわかります。pullhtoppush

私はArchiLinuxを使用しています。

gdrive-push-sync.sh:

#!/bin/bash

cd $GDRIVE
ignore=".gd/"

inotifywait $GDRIVE -m -r -e modify -e create -e delete -e move |
  while read directory action file; do
    relPath=${directory#"$GDRIVE"}
    if [ "$relPath" != "$ignore" ]; then
      echo "$action $relPath$file"
      drive push $relPath$file
    fi
  done

gdrive-pull-sync.sh:

#!/bin/bash

cd $GDRIVE

while true
do
drive pull
sleep 10m
done

ベストアンサー1

おすすめ記事