View Single Post
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#81
xes and me modified some broken details around import of users from garage to midgard (www)
The user that used to run that script
Code:
crontab on www
# Garage accounts sync
#*/30 * * * *  root  date >>/var/log/midgard/garage_sync.log && /usr/local/bin/garage_sync.sh >>/var/log/midgard/garage_sync.log
0 2 * * *  root  date >>/var/log/midgard/garage_sync.log && /usr/local/bin/garage_sync.sh >>/var/log/midgard/garage_sync.log && date >>/var/log/midgard/garage_sync.log
for unclear reasons didn't authenticate against midgard anymore

We changed that script so it's
a) safe for publishing now ;-D
Code:
#!/bin/bash



# sync garage accounts to midgard. Using org.maemo.garagesync

source /etc/scriptadmin/credentials
source /usr/local/bin/packages/pid.sh


pid_check /var/tmp/garage_sync.pid

lynx -dump -auth=$scriptadmin:$password http://local.maemo.org/midcom-exec-org.maemo.garagesync/import.php?confirm=1 | sed '/^$/d'

RET=$?

rm -f /tmp/get_garage_csvs.pid

pid_cleanup /var/tmp/garage_sync.pid

exit $RET
and
b) the user "scriptadmin" used now actually does work (I created a dedicated user in midgard for that purpose)
Code:
see login failure on monday 24.7. while tue 25.7. it worked. The test runs that processed all backlog (#83310 - #83430) got lost in logfile since invoked "manually"
Mon Jun 24 02:00:01 UTC 2013
   [1]Maemo.org
   __________________ Search
     * [2]Create account
     * [3]Intro
     * [4]Downloads
     * [5]Community
     * [6]Development
     * [7]News
   maemo.org
Login
   You have reached a page, which requires you to be authenticated. Please
   login on the form below.
   User name
   ____________________
   Password
   ____________________
   Login
   Please enter your username and password.
     * Copyright © 2002-2008 Nokia Corporation
     * [8]Terms of Use
     * [9]Privacy Policy
     * Powered by [10]Midgard CMS
   sponsored by Nokia Corporation
References
   1. http://maemo.org/
   2. https://garage.maemo.org/account/register.php
   3. http://local.maemo.org/intro/
   4. http://local.maemo.org/downloads/
   5. http://local.maemo.org/community/
   6. http://local.maemo.org/development/
   7. http://local.maemo.org/news/
   8. http://maemo.org/legal/terms_of_use.html
   9. http://maemo.org/legal/privacy_policy.html
  10. http://www.midgard-project.org/
Mon Jun 24 02:00:01 UTC 2013
Tue Jun 25 02:00:01 UTC 2013
Tue Jun 25 02:05:34 UTC 2013
Wed Jun 26 02:00:01 UTC 2013
   INFO: Created new user 'eco' (#83431)
Wed Jun 26 02:06:10 UTC 2013
Thu Jun 27 02:00:01 UTC 2013
   INFO: Created new user 'andersonsampaio' (#83432)
Thu Jun 27 02:05:56 UTC 2013
according to /var/log/midgard/garage_sync.log this been broken since
Code:
Wed Apr 24 13:30:01 UTC 2013
Wed Apr 24 14:00:01 UTC 2013
Wed Apr 24 14:30:01 UTC 2013
Thu Apr 25 02:00:01 UTC 2013
   INFO: Created new user 'n900-dk' (#83303)
   INFO: Created new user 'alecsandru' (#83304)
   INFO: Created new user 'xavierxcvii' (#83305)
   INFO: Created new user 'youthanasia' (#83306)
Fri Apr 26 02:00:01 UTC 2013
   INFO: Created new user 'testimonyii' (#83308)
Sat Apr 27 02:00:01 UTC 2013
   INFO: Created new user 'sathishrocks39' (#83309)
Sun Apr 28 02:00:01 UTC 2013
   [1]Maemo.org
   Register
Register
     * [2]Intro
     * [3]Downloads
     * [4]Community
     * [5]Development
     * [6]News
     * [7]TALK
   maemo.org
Login
   Access denied: You need administrator privileges.
I hope some of the broken stuff around autobuilder/accounts et al will now normalize

cheers
/j
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N

Last edited by joerg_rw; 2013-06-27 at 10:51.
 

The Following 14 Users Say Thank You to joerg_rw For This Useful Post: