i2pd: move chmod command 11252/head
authorRosen Penev <rosenp@gmail.com>
Wed, 5 Feb 2020 02:50:35 +0000 (18:50 -0800)
committerRosen Penev <rosenp@gmail.com>
Wed, 5 Feb 2020 02:50:35 +0000 (18:50 -0800)
Similar change to upstream.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
net/i2pd/files/i2pd.init

index 81e97cdce53eadce7b137152649f8c2efd3a7470..010a87fd233c9e723c468670523a982008637dee 100755 (executable)
@@ -15,16 +15,16 @@ DATADIR=/var/lib/i2pd
 
 start_service() {
        ## RAM
-       if [ ! -d $DATADIR ]; then
+       [ -d $DATADIR ] || {
                mkdir -p $DATADIR
+               chown $USER:$GROUP $DATADIR
                ln -s /usr/share/i2pd/certificates  $DATADIR/certificates
                ln -s /etc/i2pd/tunnels.conf $DATADIR/tunnels.conf
                # for peoples who not possible to use http reseeding
                ln -s /etc/i2pd/addressbook $DATADIR/addressbook
-       fi
+       }
 
        ## We need permissions
-       chown $USER:$GROUP $DATADIR
        touch $PIDFILE
        chown $USER:adm $PIDFILE