Commit 9080bc2f authored by Seblu's avatar Seblu
Browse files

Move config file to /etc/aurbot.conf

parent deb32ab1
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ pkgdesc='AUR Builder Bot'
arch=('any')
url='https://github.com/seblu/aurbot'
license=('GPL2')
backup=('etc/aurbot.conf')
makedepends=('python-distribute')
depends=('python' 'systemd')
optdepends=('devtools')
@@ -17,10 +18,14 @@ install=aurbot.install
package() {
  cd "$startdir"
  install -Dm755 aurbot "$pkgdir/usr/bin/aurbot"
  install -Dm644 /dev/null "$pkgdir/etc/aurbot.conf"

  install -dm755 "$pkgdir/usr/share/doc/aurbot/samples"
  install -m644 aurbot.conf.example{1,2,3} "$pkgdir/usr/share/doc/aurbot/samples"

  install -Dm644 aurbot.service "$pkgdir/usr/lib/systemd/system/aurbot.service"
  install -Dm644 aurbot.sysusers "$pkgdir/usr/lib/sysusers.d/aurbot.conf"
  install -Dm644 packages.conf "$pkgdir/usr/share/doc/aurbot/samples/packages.conf"
  install -dm750 "$pkgdir/var/lib/aurbot"
  install -Dm644 aurbot.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/aurbot.conf"
}

# vim:set ts=2 sw=2 et:
+5 −0
Original line number Diff line number Diff line
@@ -46,6 +46,11 @@ QUICK SETUP
4. Run aurbot


ENVIRONMENT
===========
*AURBOT_CONFIG* overrides the config file path (default is /etc/aurbot.conf)


SOURCES
=======
*Aurbot* sources are available on github [#]_.
+4 −4
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ AUR_URL = 'https://aur.archlinux.org'
USER_AGENT = "aurbot"
XDG_DIRECTORY = "aurbot"
DEFAULT_CHECK_INTERVAL = 86400
DEFAULT_CONFIG_FILE = "/etc/aurbot.conf"

ERR_USAGE = 1
ERR_FATAL = 2
@@ -357,7 +358,8 @@ def parse_argv():
	'''Parse command line arguments'''
	# load parser
	parser = ArgumentParser()
	parser.add_argument("-c", "--config", help="packages config file path")
	parser.add_argument("-c", "--config", help="config file path",
		default=environ.get("AURBOT_CONFIG", DEFAULT_CONFIG_FILE))
	parser.add_argument("-d", "--debug", action="store_true", help="debug mode")
	parser.epilog = "You could set $XDG_DATA_HOME to change the path of the local package cache."
	# parse it!
@@ -365,9 +367,6 @@ def parse_argv():
	# set global debug mode
	if args.debug:
		getLogger().setLevel(DEBUG)
	# set default paths
	if args.config is None:
		args.config = join(save_config_path(XDG_DIRECTORY), "packages.conf")
	return args

def main():
@@ -377,6 +376,7 @@ def main():
		hdlr = StreamHandler()
		hdlr.setFormatter(ABFormatter())
		getLogger().addHandler(hdlr)
		# Early debugging mode
		getLogger().setLevel(DEBUG if "AURBOT_DEBUG" in environ else INFO)
		# use sighup to unblock sleep syscall
		signal(SIGHUP, lambda signum, frame: info("SIGHUP received"))
+0 −0

File moved.

+0 −0

File moved.

Loading