diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/mkjail | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -97,8 +97,12 @@ function jailist_update { # update the jail list file # usage: jailist_update <jail-path> - if ! grep -q "^$1" $JAIL_LIST; then - echo $1 >> $JAIL_LIST + if [ -f "$JAIL_LIST" ]; then + if ! grep -q "^$1" $JAIL_LIST; then + echo $1 >> $JAIL_LIST + fi + else + echo $1 > $JAIL_LIST fi } |