Remove lock on fail

This commit is contained in:
Bob Mottram 2018-04-02 12:57:27 +01:00
parent 6108a065e8
commit 93a64b218f
1 changed files with 2 additions and 0 deletions

View File

@ -121,10 +121,12 @@ function peertube_import_from_syncthing {
echo " peertubetitle=\$(basename \"\$video_file\" | awk -F '.' '{print \$1}' | sed 's|_| |g' | sed 's|-| |g')";
echo " if $nodecmd \$import_script -n \"\$peertubetitle\" \$peertubensfw \$peertubeprivate -u \"\$peertubedomain\" -U \"\$peertubeuser\" --password \"\$peertubepassword\" -f \"\$video_file\"; then";
echo " echo \"\$video_file\" >> /root/.peertube_uploaded";
echo ' rm /root/.peertube.lock';
echo " exit 0";
echo ' else';
echo " failed_uploads=\$((failed_uploads+1))";
echo " if [ \$failed_uploads -gt 1 ]; then";
echo ' rm /root/.peertube.lock';
echo ' exit 0';
echo ' fi';
echo ' fi';