Skip to content

Commit

Permalink
Ready for release
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Nov 20, 2016
1 parent 86c4c9e commit a80af44
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Included modules
import os
import sys

# ZeroNet Modules
import zeronet
Expand All @@ -12,7 +13,8 @@ def mkdirp(directory):
os.makedirs(directory)

def main():
mkdirp(os.environ['SNAP_USER_DATA']+"/data")
sys.argv = [sys.argv[0]]+["--data_dir", os.environ['SNAP_USER_COMMON']+"/data", "--log_dir", os.environ['SNAP_USER_DATA']+"/log"]+sys.argv[1:]
mkdirp(os.environ['SNAP_USER_COMMON']+"/data")
mkdirp(os.environ['SNAP_USER_DATA']+"/log")
os.chdir(os.environ['SNAP'])
zeronet.main()
Expand Down
8 changes: 6 additions & 2 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ description: |
Impossible to shut down: It's nowhere because it's everywhere.
Fast and works offline: You can access the site even if Internet is unavailable.
grade: devel # must be 'stable' to release into candidate/stable channels
plugs:
network:
network-bind:

grade: stable
confinement: strict

apps:
zeronet:
command: zero/Python/python $SNAP/main.py --data_dir $SNAP_USER_DATA/data --log_dir $SNAP_USER_DATA/data
command: zero/Python/python $SNAP/main.py
plugs: [network,network-bind]
env:
command: env
Expand Down

0 comments on commit a80af44

Please sign in to comment.