update
This commit is contained in:
		@@ -136,10 +136,17 @@ function DeleteRecord {
 | 
			
		||||
function Main {
 | 
			
		||||
    [ -e "$PID_FILE" ] && Error Pid file $PID_FILE already exists, quit!
 | 
			
		||||
    echo $$ > $PID_FILE
 | 
			
		||||
    ListRecord
 | 
			
		||||
    [ -z "$RECORD_ID" ] && CreateRecord
 | 
			
		||||
    [ -n "$RECORD_ID" ] && ModifyRecord
 | 
			
		||||
    END=1
 | 
			
		||||
    for _ in {1..5}; do
 | 
			
		||||
        ListRecord || continue
 | 
			
		||||
        if [ -z "$RECORD_ID" ]; then
 | 
			
		||||
            CreateRecord || continue
 | 
			
		||||
        else
 | 
			
		||||
            ModifyRecord || continue
 | 
			
		||||
        fi
 | 
			
		||||
        END=1
 | 
			
		||||
        return 0
 | 
			
		||||
    done
 | 
			
		||||
    return 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Start here
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user